Skip to main content

Stacks Cheatsheet

Configuration

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 Overrides

terraform:
overrides:
env: {}
settings: {}
vars: {}
command: "opentofu"

Spacelift Settings

terraform:
components:
$component:
settings:
spacelift:
# The `autodeploy` setting was overridden with the value
# from `terraform.overrides.settings.spacelift.autodeploy`
autodeploy: true
workspace_enabled: true

Commands

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