Brainboard's documentation
Website 🏛️Go to the app ↗
  • Welcome
  • Getting started
    • Fast track
    • Start with a template
    • Start with AI
    • Use cases videos
    • Brainboard philosophy
  • Cloud design
    • Left bar
      • Cloud resources
      • Input & output
    • Design area
      • Node
      • ID card
      • Connectors
      • Versioning
      • Graphical options
    • One action
    • Code Edition
  • Data
    • Data structure
      • Project
      • Environment
      • Cloud architecture
        • Terraform files
        • Readme file
        • Architecture Synchronization
        • Remote backend
      • Template
    • Cloud providers
      • Supported cloud providers
      • Customize provider configuration
      • Unsupported cloud providers
    • Terraform / OpenTofu
      • Modules
        • Module
        • Import modules
        • Manage module
        • Terraform registry credentials
        • Use modules
    • Disaster recovery
  • Automation
    • CI/CD engine
    • Supported plugins
      • Terraform
      • Security
        • Trivy
        • Tfsec
        • Terrascan
        • OPA
        • Checkov
      • Infracost
      • Notifications
        • Email
        • Slack
        • Microsoft Teams
      • Webhooks
    • Pipelines
    • Workflow templates
    • Drift detection
      • Types of drift
      • Remediation
    • Self-Hosted Runner
      • Deploy runner with Kubernetes
      • Deploy runner with docker-compose
  • Settings
    • Overview
    • Authentication
      • Login into Brainboard
      • Single sign-on (SSO)
    • Account management
    • Organization
    • Members
    • Teams
    • Roles & Permissions (RBAC)
      • Level of access
      • Organization RBAC
      • Project RBAC
    • Integrations
      • Git configuration
        • GitHub
        • Azure DevOps (ADO)
        • Bitbucket
        • GitLab
        • How to use
      • Cloud providers
        • AWS
        • Azure
        • GCP
        • OCI
  • Security
    • Data managed by Brainboard
    • SOC 2 Type II
    • Role Based Access Control
  • Help & FAQ
    • Shortcuts
    • FAQ
    • Migration
      • Import from AWS
    • Support
    • Glossary
  • Changelog
Powered by GitBook
On this page
  • Push the code to Git (Pull Request)
  • Import from Git
  • Best practices

Was this helpful?

Edit on GitHub
  1. Settings
  2. Integrations
  3. Git configuration

How to use

PreviousGitLabNextCloud providers

Last updated 1 month ago

Was this helpful?

Push the code to Git (Pull Request)

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.

How to do a Pull Request

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:

  1. You first have to setup the integration between Brainboard and your git repository. Refer to these pages to do the integration with:

    • GitHub

    • Azure DevOps (ADO)

    • GitLab

    • Bitbucket

  2. 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:

  3. In the design area, on the right, click on Pull request button

  4. 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:

  5. Brainboard pushes only the difference between the branches, as it does git pull first before pushing.

Import from Git

You can import your existing Terraform code from your repository directly in Brainboard.

To do so:

  1. Click on New architecture

  2. Select import from your infrastructure

  3. Select From Git repository

  4. Select your Git provider

  5. 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

  6. 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

  7. You click on Import to initiate the import from Git.

Best practices

  1. 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.

  2. Rotate your personal git tokens regularly.