How to use
Last updated
Was this helpful?
Last updated
Was this helpful?
A pull request is a way that allows you to push the generated Terraform code from Brainboard into your git repository.
It is similar to doing git add .
, git commit -m 'commit message'
and git push
on your laptop.
When you do a pull request, Brainboard packages all the generated files for your infrastructure, does the pull request into the git repository that you configure and gives you back the link to the PR.
Here are important information on how it works:
You first have to setup the integration between Brainboard and your git repository. Refer to these pages to do the integration with:
Select the Git credentials you want to associate to your architecture in the settings page of the architecture
You can also configure the Git repository, source and target branch, and the default files to be included in the PR:
In the design area, on the right, click on Pull request
button
This will open the modal of the PR where you can customize the commit message, the title, description and also select the files you want/don't want to push to Git:
Brainboard pushes only the difference between the branches, as it does git pull first before pushing.
You can import your existing Terraform code from your repository directly in Brainboard.
To do so:
Click on New architecture
Select import from your infrastructure
Select From Git repository
Select your Git provider
This will open the dedicate import page of your Git provider. In this example, Azure DevOps is open. You can select the Git credentials you want to use for this import
Once you select the Git credentials, Brainboard will scan your repository, and you can select the right project to import from, the branch and subfolders is needed
You click on Import
to initiate the import from Git.
It's a best practice to push a clean code, so before you do a pull request, make sure that your architecture and the generated code is:
Working properly. Try to have at least a plan
succeeding before doing a PR.
Respect your budget. Use Brainboard CI/CD engine to integrate costs into your pipeline of tests and make sure it's under budget.
Secure. Add security checks like TFSEC, Checkov and even policy as code like OPA into your pipelines.
Refer to the CI/CD engine to know how to build your pipelines.
Rotate your personal git tokens regularly.