Overview
With human access configured, you now need to configure the external service integrations that enable CI/CD automation. This page covers:- AWS: Account IDs and role ARNs for Terraform
- GitHub (octo-sts): Tokens for managing GitHub organization resources
- Terramate Cloud (optional): Plan visualization and drift detection
Verify Terraform Configuration
Yourterraform/config.tm.hcl should already have the correct values from the Bootstrap Accounts step. Verify they look like this:
Configure GitHub Repository Variables
GitHub Actions needs the OIDC role ARN to authenticate. Add these variables to your repository (Settings > Secrets and variables > Actions > Variables):| Variable | Value |
|---|---|
TERRAFORM_AWS_ROLE_ARN | arn:aws:iam::<INFRA_ACCOUNT_ID>:role/<NAMESPACE>-gbl-infra-bootstrap-github-oidc |
TERRAFORM_AWS_REGION | Your primary AWS region (e.g., us-east-2) |
These are repository variables, not secrets, since the values are not sensitive. GitHub Actions only needs the Infrastructure account role. Cross-account access is handled by each Terraform stack’s provider configuration.
Update GitHub Workflows
The workflows read credentials from GitHub repository variables. Verify the workflow files reference the variables correctly:Configure octo-sts for GitHub Tokens
The Terramate workflows use octo-sts to obtain GitHub tokens for managing GitHub organization resources (teams, members, repository settings). This is more secure than storing long-lived GitHub tokens as secrets.1
Install the octo-sts GitHub App
- Navigate to the octo-sts GitHub App
- Click Install and select your organization
- Grant access to your forked repository (or all repositories)
2
Update trust policy files
Update each policy file in Replace
.github/chainguard/ to reference your organization:.github/chainguard/terramate.sts.yaml:.github/chainguard/release-please.sts.yaml:<YOUR_ORG> with your GitHub organization name and <your-repo> with your repository name.Configure Terramate Cloud (Optional)
If you want to use Terramate Cloud for plan visualization and drift detection:- Create an account at cloud.terramate.io (EU) OR us.cloud.terramate.io (US)
- Install the GitHub App from your Terramate Cloud dashboard under Integrations to enable PR comments and status checks
- Update the
cloud_organizationin.github/workflows/terramate-preview.ymland other Terramate workflows:
Search for Remaining References
Search for any remaining references to the original organization or AWS accounts:Verify Your Setup
Commit Your Changes
Verify CI/CD
Push a commit or open a pull request to verify that GitHub Actions can authenticate to AWS:- Check the workflow run in the Actions tab
- The
Configure AWS Credentialsstep should succeed - Terraform plan output should appear (if using Terramate Cloud, check the PR comments)
Troubleshooting
”Access Denied” when assuming cross-account role
The two-step authentication means there are two places trust can fail:-
GitHub → Infrastructure account: Check the OIDC role trust policy
-
Infrastructure account → Target account: Check the target role trust policy
GitHub Actions can’t authenticate
-
Verify the OIDC provider exists in the Infrastructure account:
-
Check the GitHub OIDC role trust policy allows your repository:
- Ensure the repository name in the trust policy matches exactly (case-sensitive, including organization name).