Skip to content

Prepare infrastructure repository

Prepare an existing infrastructure repository for the new Terraform plan/apply GitHub Actions workflows.

Step 1: Protect your default branch

Branch rulesets protect your default branch (typically main) by requiring PR reviews and status checks before merging.

  1. In your repository, go to SettingsCustom properties and set gp-repository-type to infra.
  2. After setting the custom property, verify that SettingsRulesets shows rules inherited from the organization.

Step 2: Remove overlapping rulesets

The organization-level rulesets from the previous step replace any repo-level rulesets that Utviklerflyt has previously set up for you - if any. If your repository has repo-level rulesets such as "Protect default branch" or "Require team approval", these can now be removed. Contact Utviklerflyt if you are unsure which to remove.

Step 3: Review repository access

Go to SettingsCollaborators and teams and ensure that only a limited number of users (e.g., your product team) has write access to your repository.

Step 4: Disable overlapping workflows

Disable any existing GitHub Actions workflows that run Terraform plan or apply to avoid conflicts with the new workflows.

  1. Go to Actions in the repository
  2. Select the workflow to disable
    • Any old CI/CD workflows from Golden Path (ending with - Terraform on changed dirs) should be disabled if present.
  3. Select ... (three dots) and choose Disable workflow

Contact Utviklerflyt if you are unsure which to disable.

Next steps