Skip to main content
Latest Documentation
This is the latest documentation for the Cloud Posse Reference Architecture. To determine which version you're currently using, please see Version Identification.

How to Move `atmos-gitops-config.yaml` to `atmos.yaml`

Problem

We want to reduce config files related to GitOps in the infrastructure repository and move the atmos-gitops-config.yaml file to atmos.yaml.

Solution

tip

TL;DR Create the changes according to the Move atmos-gitops-config.yaml to atmos.yaml PR.

Set GitHub action variables ATMOS_VERSION and ATMOS_CONFIG_PATH

variable namevalue
ATMOS_VERSION1.63.0
ATMOS_CONFIG_PATH./rootfs/usr/local/etc/atmos/

Updating

Create changes following the Move atmos-gitops-config.yaml to atmos.yaml PR as an example.

The following configuration fields now moved to GitHub action variables ATMOS_VERSION and ATMOS_CONFIG_PATH

namevariable namevalue
atmos-versionATMOS_VERSION1.63.0
atmos-config-pathATMOS_CONFIG_PATH./rootfs/usr/local/etc/atmos/

The following configuration fields moved to the atmos.yaml configuration file.

nameYAML path in atmos.yaml
aws-regionintegrations.github.gitops.artifact-storage.region
terraform-state-bucketintegrations.github.gitops.artifact-storage.bucket
terraform-state-tableintegrations.github.gitops.artifact-storage.table
terraform-state-roleintegrations.github.gitops.artifact-storage.role
terraform-plan-roleintegrations.github.gitops.role.plan
terraform-apply-roleintegrations.github.gitops.role.apply
terraform-versionintegrations.github.gitops.terraform-version
enable-infracostintegrations.github.gitops.infracost-enabled
sort-byintegrations.github.gitops.matrix.sort-by
group-byintegrations.github.gitops.matrix.group-by

For example, to migrate to the new version, you should have something similar to the following in your atmos.yaml:

./rootfs/usr/local/etc/atmos/atmos.yaml

# ... your existing configuration
integrations:
github:
gitops:
terraform-version: 1.4.5
infracost-enabled: False
artifact-storage:
region: us-east-1
bucket: acme-core-use1-auto-gitops
table: acme-core-use1-auto-gitops-plan-storage
role: arn:aws:iam::111111111111:role/acme-core-use1-auto-gha-iam-gitops-gha
role:
plan: arn:aws:iam::222222222222:role/acme-core-gbl-identity-gitops
apply: arn:aws:iam::222222222222:role/acme-core-gbl-identity-gitops
matrix:
sort-by: .stack_slug
group-by: .stack_slug | split("-") | [.[0], .[2]] | join("-")

This corresponds to the previous configuration ./.github/config/atmos-gitops.yaml file (deprecated) like this:

atmos-version: 1.63.0
atmos-config-path: ./rootfs/usr/local/etc/atmos/
terraform-state-bucket: acme-core-use1-auto-gitops
terraform-state-table: acme-core-use1-auto-gitops-plan-storage
terraform-state-role: arn:aws:iam::111111111111:role/acme-core-use1-auto-gha-iam-gitops-gha
terraform-plan-role: arn:aws:iam::222222222222:role/acme-core-gbl-identity-gitops
terraform-apply-role: arn:aws:iam::222222222222:role/acme-core-gbl-identity-gitops
terraform-version: 1.4.5
aws-region: us-east-1
enable-infracost: False
sort-by: .stack_slug
group-by: .stack_slug | split("-") | [.[0], .[2]] | join("-")