Skip to content

CI/CD common

Install the cicd-common stack to be able to run GitHub Actions workflows for Terraform.

Use correct guides

If you have just set up an IaC repository through the Setup section of this documentation, this guide is for you. If your IaC repository has existed for a while, use the Migration guide instead.

Step 1: Install cicd-common

repo-iac/environments/dev/
ok pkg add cicd-common
cd cicd-common
ok pkg install

To configure proper IAM roles and resources in AWS, update config_override.tf:

repo-iac/environments/dev/cicd-common/config_override.tf
locals {
  trusted_repositories = [
    {
      name  = "<repo-name>"
      type  = "infra"
    },
  ]
}

Update these values:

Field Description Example
<repo-name> Name of your IaC repository pirates-iac

Step 2: Apply

Commit and push to main (or via a pull request).

Apply the new Terraform code from your local machine:

repo-iac/environments/dev/cicd-common/
terraform init
terraform apply

Next steps