InfraDots logo
Documentation

Version Control System (VCS) Providers

Version Control System (VCS) providers allow you to connect your InfraDots workspaces to your source code repositories.

What are VCS Providers?

VCS providers in InfraDots Platform enable you to:

  • Connect workspaces to git repositories containing IaC configurations
  • Automatically trigger runs when changes are pushed to your repository
  • Track which code changes triggered which infrastructure changes
  • Enable GitOps workflows for your infrastructure

Supported VCS Providers

InfraDots currently supports the following VCS providers:

  • GitHub: Connect to public and private repositories on GitHub.com
  • GitHub Enterprise: Connect to repositories on your self-hosted GitHub Enterprise instance
  • GitLab: Connect to public and private repositories on GitLab.com
  • GitLab Enterprise/Community Edition: Connect to repositories on your self-hosted GitLab instance

A self-hosted instance's URL must resolve to a public IP address: InfraDots calls it from the internet and refuses a private, loopback or link-local address when you connect it.

  • Bitbucket Cloud: Connect to public and private repositories on bitbucket.org

Connecting a VCS Provider

GitHub

  1. Navigate to your organization's settings
  2. Select the "VCS Providers" tab
  3. Click "Add VCS Provider"
  4. Select "GitHub"
  5. On GitHub.com, register a new OAuth Application with the following information:
    • Application Name: InfraDots (your-organization-name)
    • Homepage URL: Your InfraDots platform URL
    • Application description: Any description of your choice
    • Authorization callback URL: The callback URL provided by InfraDots
  6. After registering the application, you'll be taken to the new application's page
  7. Enter the Client ID in the InfraDots form
  8. Generate a new client secret on GitHub and enter it in the InfraDots form
  9. Click "Connect and Continue"
  10. You will be redirected to GitHub to authorize the application
  11. After authorization, you'll be redirected back to InfraDots with the connection established

You can register a GitHub App instead of an OAuth Application and enter its Client ID and client secret the same way. A GitHub App's "Expire user authorization tokens" setting is on by default: its access token lasts 8 hours, and InfraDots renews it before it expires. The token InfraDots renews it with lasts 6 months, so a connection that goes unused for that long has to be connected again.

GitLab

  1. Navigate to your organization's settings
  2. Select the "VCS Providers" tab
  3. Click "Add VCS Provider"
  4. Select "GitLab"
  5. On GitLab.com, navigate to User Settings → Applications and register a new OAuth Application with the following information:
    • Name: InfraDots (your-organization-name)
    • Redirect URI: The callback URL provided by InfraDots
    • Scopes: Only select "api"
  6. After clicking "Save application", you'll be taken to the new application's page
  7. Enter the Application ID and Secret in the InfraDots form
  8. Click "Connect and Continue"
  9. You will be redirected to GitLab to authorize the application
  10. After authorization, you'll be redirected back to InfraDots with the connection established

Bitbucket

  1. Navigate to your organization's settings
  2. Select the "VCS Providers" tab
  3. Click "Add VCS Provider"
  4. Select "Bitbucket"
  5. On bitbucket.org, logged in as the account you want InfraDots to act as, open your workspace settings and add a new OAuth consumer with the following information:
    • Name: InfraDots (your-organization-name)
    • Callback URL: The callback URL provided by InfraDots
    • URL: Your InfraDots platform URL
    • This is a private consumer: Checked
    • Permissions: Account: Write, Repositories: Admin, Pull requests: Write, Webhooks: Read and write
  6. Save the consumer, then click its name under "OAuth consumers" to reveal its Key and Secret
  7. Enter the Key and Secret in the InfraDots form
  8. Click "Connect and Continue"
  9. You will be redirected to Bitbucket to authorize the consumer
  10. After authorization, you'll be redirected back to InfraDots with the connection established

GitLab and Bitbucket access tokens last 2 hours. InfraDots renews them before they expire.

Managing VCS Connections

Viewing Connected Providers

  1. Navigate to your organization's settings
  2. Select the "VCS Providers" tab
  3. View the list of connected VCS providers

Removing a VCS Provider

  1. Navigate to your organization's settings
  2. Select the "VCS Providers" tab
  3. Find the VCS provider you want to remove
  4. Click the delete icon
  5. Confirm the deletion

Updating VCS Provider Settings

If you need to update your VCS provider settings:

  1. Remove the existing VCS provider connection
  2. Add a new VCS provider with the updated settings

VCS-Driven Workflow

Developer ──▶ Git Push ──▶ GitHub/GitLab
                                │
                           Webhook Event
                                │
                                ▼
                         InfraDots Platform
                                │
                    ┌───────────┴───────────┐
                    ▼                       ▼
              Terraform Plan          IDP Agent Review
                    │                       │
                    └───────────┬───────────┘
                                ▼
                         Apply (if approved)

What starts a run

The same rules apply to GitHub, GitLab and Bitbucket:

  • A push to the workspace's branch starts a run. The branch name is matched in full, so a branch such as release/prod works. Pushing a tag or deleting a branch starts nothing.
  • A pull request (a merge request on GitLab) starts a plan when it is opened, reopened, or receives new commits. Labeling, assigning, approving or retitling it does not plan again.
  • Which workspaces run. A push or pull request concerns the workspaces connected to that repository, compared as owner/repo regardless of case, so a push to acme/app never starts a workspace on acme/app-infra. Of those, a workspace runs when a changed file is in its folder or matches one of its trigger patterns.
  • When the changed files aren't known, every workspace on that repository and branch runs: Bitbucket push events don't list the files, and GitLab lists only the first 20 commits of a push.
  • Closing or merging a pull request cancels that pull request's plans that are still queued. A run that is already executing, or an apply someone has already approved, is left to finish.

Plan Comments on Pull Requests

When a plan for a pull request finishes, InfraDots posts what it found on the pull request itself, so reviewers see the change where they are already looking:

InfraDots plan — acme-prod

2 to add, 1 to change, 0 to destroy

- create  aws_s3_bucket.logs
- update  aws_iam_role.deploy
- create  aws_instance.api

Waiting for approval · View run · abc1234
  • One comment per workspace, updated in place. Every push to the pull request edits the same comment rather than adding a new one. If a repository has several workspaces, each gets its own. If someone deletes the comment, the next plan posts a fresh one.
  • Only the newest plan. If two pushes finish out of order, the older plan never overwrites the newer one. The commit the plan was made for is shown at the end of the comment.
  • Long plans are trimmed. The first 20 resources are listed, followed by a count of the rest and a link to the full plan in InfraDots.
  • Sensitive values stay out. The comment is built from InfraDots' masked, structured summary of the plan, never from the raw plan output.
  • Pull requests only. Runs triggered by a push to the default branch, by a schedule, or by drift detection are not commented on. A plan that fails is reported through the status check rather than a comment.

InfraDots needs permission to comment on pull requests in the connected repository. If it doesn't have it, the run is unaffected and the comment is simply skipped.

Turning plan comments off

Plan comments are on by default. To turn them off, set pr_plan_comments to false on the organization to stop them everywhere, or on a single workspace to opt just that one out. A workspace setting takes precedence over the organization's, and a workspace that hasn't set it follows the organization.

Commit Status Checks

Every run reports its state on the commit it ran for: pending when it is queued, then success or failure when it finishes. The check links to the run in InfraDots.

  • One check per workspace. The check is named InfraDots Platform / <workspace>, for example InfraDots Platform / prod-network. When several workspaces build the same commit, each shows its own result, and one finishing does not overwrite another's.
  • Same name on every provider. GitHub, GitLab and Bitbucket all show the check under this name.

To block merges on a plan, require the workspace's check in your branch protection rules. A rule that requires the older, shared InfraDots Platform check never passes, because runs no longer report under that name. Replace it with one rule per workspace.

Using VCS with Workspaces

Once you've connected a VCS provider, you can use it with your workspaces:

  1. When creating a new workspace, select "Version Control Workflow"
  2. Choose the VCS provider you want to use
  3. Select the repository and branch containing your Terraform configuration
  4. Configure any additional settings
  5. Create the workspace

The workspace will now be connected to your VCS repository. Any changes pushed to the specified branch will trigger a new run in the workspace.

💡 Tip

[!tip] For GitHub, you can use a GitHub App instead of an OAuth app for more granular repository access control.

Troubleshooting VCS Connections

If you encounter issues with your VCS connection:

  • Ensure the OAuth application has the correct permissions
  • Verify the callback URL is correctly configured
  • Check that your access token hasn't expired
  • Ensure your repository exists and is accessible to the OAuth application
  • Verify that the specified branch exists in the repository