π₯οΈInfrastructure as Code (IaC)
Connect your preferred Infrastructure as Code (IaC) source to automatically sync configurations from Sedai.
Last updated
Connect your preferred Infrastructure as Code (IaC) source to automatically sync configurations from Sedai.
Last updated
Learn more about how Sedai works with CI/CD workflows and utilizes resource to IaC file mapping to ensure resource configurations remain in sync.
Sedai's IaC synchronization feature bridges the gap between your desired infrastructure state (defined in IaC files) and the actual running infrastructure. The first step in this process is to integrate your existing IaC source code repository with Sedai. Sedai currently supports integration with Github, Gitlab and Bitbucket.
By employing a sophisticated matching algorithm, Sedai analyzes key attributes of infrastructure resources and compares them against the contents of your IaC files. This process involves parsing IaC files, extracting relevant information, and applying pattern matching techniques to identify potential matches.
To enhance accuracy, Sedai utilizes a scoring mechanism that combines rule-based logic and AI/LLM-based analysis. This approach considers factors such as exact name matches, similar types, and the contextual relevance of the IaC code. If a match is deemed highly confident, Sedai automatically identifies the necessary changes to your IaC files. However, for less certain matches, user feedback is incorporated to refine the algorithm and improve future accuracy.
Every time Sedai executes an action against your infrastructure, the corresponding impact in the IaC configuration is identified. Sedai generates a diff of the changes and sends it as a pull request or a merge request to the Git repository.
By continuously monitoring your infrastructure and updating your IaC accordingly, Sedai helps prevent configuration drift and ensures that your cloud environment remains aligned with your intended design. This automation streamlines the management process, reduces the risk of errors, and promotes a more efficient and reliable DevOps workflow.
Sedai plans to support various IaC tools to offer coverage for diverse cloud environments and allow you to ensure your IaC & Sedai configurations are in sync. Sedai currently supports Terraform and also plans to support the following IaC providers:
CloudFormation
Azure Resource Manager
Google Cloud Deployment Manager
Pulumi
Currently, Sedai uses Terraform by default, and you can integrate your preferred Git-hosting platforms (Bitbucket, Github, or GitLab) to connect your IaC. To do this, navigate to Settings > IaC and click Add Integration. Select a provider to view specific details required to integrate.
For any of these integrations, you will need to input details about your template, file format, and whether PRs will be created for all resources or a subset of resources. For the Configuration Template, choose one of the following options:
System (YAML format): This option requires you to add the target file location.
Use existing: Sedai will read and make changes to your IaC template. This option requires you to provide the HELM or Terraform CSV mapping so Sedai can locate the variable files and names.
You will also be asked to specify your preferred Merge Request/File Format:
Single: Creates a single merge request/file containing configurations for all resources, including those that did not have a change
Multiple: Creates separate merge requests/files for each changed resource with its configuration changes
Lastly, you can set up your PRs to include configuration updates for all resources connected to Sedai or for specific resources based on group(s). Learn more about setting up groups here.
Once you've entered the required details for your selected provider, click the Test Connection button to proceed. Make sure to allow Sedai to sync configuration changes and save the integration.
The following details are required to connect Bitbucket:
Integration Nickname
Give this integration a nickname within Sedai to distinguish it from other Bitbucket integrations.
Repository URL
To find the repository URL, navigate to the repository on Bitbucket and copy the URL from the browser's address bar. (Example: https://bitbucket.org/workspace/repository-name)
Default Branch
Bitbucket defaults to main
; enter an alternate branch to customize.
Token
Sedai uses Bitbucket Repository Access Tokens to read IaC template files and create merge requests. Visit Atlassian Docs to learn more.
If your repository is self-hosted, you will have the option to connect with an agent to automate and manage infrastructure configurations.
The following details are required to connect GitHub:
Integration Nickname
Give this integration a nickname within Sedai to distinguish it from other GitHub integrations.
Repository URL
To find the repository URL, navigate to the repository on GitHub and copy the URL from the browser's address bar. (Example: https://github.com/organization/repository-name)
Default Branch
GitHub defaults to main
; enter an alternate branch to customize.
Token
Sedai uses GitHub Personal Access Tokens to read IaC template files and create merge requests. The provided token should have access to all the projects passed in the CSV file. Visit GitHub Docs to learn more.
If your repository is self-hosted, you will have the option to connect with an agent to automate and manage infrastructure configurations.
The following details are required to connect GitLab:
Integration Nickname
Give this integration a nickname within Sedai to distinguish it from other GitLab integrations.
Project ID
This is used to validate the token and ensure Sedai can connect to your GitLab. The actual project ID can be set at the resource level, which can be provided in a CSV file.
Token
Sedai uses GitLab Personal Access Tokens to read IaC files and create merge requests. The provided token should have access to all the projects passed in the CSV file. Visit GitLab Docs to learn more about creating tokens.
Repository URL (if self-hosted)
To find the repository URL, Navigate to the repository and copy the URL from the browser's address bar. (Example: https://your-gitlab-domain.com/namespace/project-name.git)
If your repository is self-hosted, you will have the option to connect with an agent to automate and manage infrastructure configurations.