This guide explains how to add a new tenant in Forge, configure required files, set up GitHub App secrets, and deploy the configuration.
terragrunt/_global_settings/tenants/
terragrunt/environments/<aws account alias>/regions/<aws region>/vpcs/<vpc alias>/tenants/<tenant_name>/terragrunt.hcl
terragrunt/environments/<aws account alias>/regions/<aws region>/vpcs/<vpc alias>/tenants/<tenant_name>/runner_settings.hcl
terragrunt/environments/<aws account alias>/regions/<aws region>/vpcs/<vpc alias>/teleport/config.hcl
https://example.com
and set as active.Type | Permission | Access |
---|---|---|
Repository | Actions | Read-only |
Repository | Actions Metadata | Read-only |
Repository | Checks | Read-only |
Organization | Administration | Read/Write |
Organization | Self-hosted runners | Read/Write |
Events | Workflow job | Subscribe |
Permission table notes:
Navigate to your tenant directory and deploy the secrets:
cd terragrunt/environments/<aws account alias>/regions/<aws region>/vpcs/<vpc alias>/tenants/<tenant_name>
terragrunt apply --target aws_secretsmanager_secret_version.cicd_secrets
Use the script to set the required GitHub App secrets:
./scripts/update-github-app-secrets.sh /path/to/terragrunt/environments/<aws account alias>/regions/<aws region>/vpcs/<vpc alias>/tenants/<tenant_name> client_id Ab12cd34EfGh56ij78KL # GitHub App Client ID
./scripts/update-github-app-secrets.sh /path/to/terragrunt/environments/<aws account alias>/regions/<aws region>/vpcs/<vpc alias>/tenants/<tenant_name> name forge-use1 # GitHub App Name
./scripts/update-github-app-secrets.sh /path/to/terragrunt/environments/<aws account alias>/regions/<aws region>/vpcs/<vpc alias>/tenants/<tenant_name> id 1234567 # GitHub App ID
./scripts/update-github-app-secrets.sh /path/to/terragrunt/environments/<aws account alias>/regions/<aws region>/vpcs/<vpc alias>/tenants/<tenant_name> key /path/to/private-key.pem # GitHub App Private key
./scripts/update-github-app-secrets.sh /path/to/terragrunt/environments/<aws account alias>/regions/<aws region>/vpcs/<vpc alias>/tenants/<tenant_name> installation_id 11223344 # GitHub App Installation ID
You can run these commands in parallel by appending &
at the end of each line.
After secrets are set, deploy all resources for the tenant:
cd examples/forge_with_integrations/terragrunt/environments/prod/regions/<aws region>/vpcs/sl/tenants/<tenant_name>
terragrunt apply
id
, the GitHub App Client ID for client_id
, and the App Installation ID for installation_id
.key
value should be the path to your GitHub App’s private key PEM file.