Skip to main content

Atmos Cheatsheet

Stacks

List Stacks

atmos list stacks

Folder Structure

├── atmos.yaml
├── components
│   └── myapp
│   ├── main.tf
│   ├── outputs.tf
│   └── variables.tf
└── stacks
├── catalog
│   └── myapp.yaml
└── deploy
├── dev.yaml
├── prod.yaml
└── staging.yaml

Stack Schema

import:
- catalog/something
vars:
key: value
components:
terraform:
$component:
vars:
foo: "bar"

Stack Imports Schema

import:
- catalog/something
- path: "catalog/something/else"
context:
key: value
skip_templates_processing: false
ignore_missing_template_values: false
skip_if_missing: false

Validate Stacks

atmos validate stacks

Components

List Components

atmos list components

Validate Components

atmos validate component $component -s $stack
atmos validate component $component -s $stack --schema-type jsonschema --schema-path $component.json
atmos validate component $component -s $stack --schema-type opa --schema-path $component.rego
atmos validate component $component -s $stack --schema-type opa --schema-path $component.rego --module-paths catalog
atmos validate component $component -s $stack --timeout 15

Workflows

List Workflows

atmos list workflows

Terraform

Plan Root Modules

atmos terraform plan

Apply Root Modules

atmos terraform apply $component --stack $stack
atmos terraform apply $component --stack $stack -auto-approve
atmos terraform apply $component --stack $stack $planfile

Deploy Root Modules

atmos terraform apply
atmos terraform apply $component --stack $stack -out $planfile
atmos terraform apply $component --stack $stack -var "key=value"

Describe

Describe Affected

atmos describe affected
atmos describe affected --verbose=true
atmos describe affected --ref refs/heads/main
atmos describe affected --ref refs/heads/my-new-branch --verbose=true
atmos describe affected --ref refs/heads/main --format json
atmos describe affected --ref refs/tags/v1.16.0 --file affected.yaml --format yaml
atmos describe affected --sha 3a5eafeab90426bd82bf5899896b28cc0bab3073 --file affected.json
atmos describe affected --sha 3a5eafeab90426bd82bf5899896b28cc0bab3073
atmos describe affected --ssh-key <path_to_ssh_key>
atmos describe affected --ssh-key <path_to_ssh_key> --ssh-key-password <password>
atmos describe affected --repo-path <path_to_already_cloned_repo>
atmos describe affected --include-spacelift-admin-stacks=true