What is Atmos?
Atmos is a command-line tool that wraps Terraform (or OpenTofu) and adds a configuration layer that separates what to deploy (components) from where to deploy it (stacks).Key Atmos Concepts
Components
A component is a reusable Terraform module. This bundle includes components for:- S3 buckets
- DynamoDB tables
- SQS queues
- IAM roles
- Karpenter node pools
atmos/components/terraform/ and contain standard Terraform code.
Stacks
A stack is a configuration file that defines which components to deploy and with what settings. Stacks live inatmos/stacks/ and are written in YAML:
How Context Uses Atmos
This infrastructure bundle uses Atmos to:- Simplify onboarding — The
atmos bootstrapcommand handles configuration, state backend creation, and deployment in a guided flow - Manage configuration — Your settings (namespace, region, cluster name) are stored in one file (
atmos/stacks/valinor/_config.yaml) and automatically applied to all components - Enable customization — You can override any default by editing stack files, without modifying Terraform code
Common Commands
| Command | Description |
|---|---|
atmos bootstrap | Guided setup wizard |
atmos bootstrap configure | Configure your environment |
atmos bootstrap terraform | Deploy all infrastructure |
atmos bootstrap terraform --plan | Preview changes before deploying |
atmos terraform plan <component> -s <stack> | Plan a single component |
atmos terraform apply <component> -s <stack> | Apply a single component |
atmos describe component <component> -s <stack> | View resolved configuration |
Example: Deploying a Single Component
To deploy just the S3 bucket:acme-usw2 with your stack name (the combination of your namespace and environment).
Example: Viewing Configuration
To see the fully resolved configuration for a component:Configuration Files
| File | Purpose |
|---|---|
atmos.yaml | CLI configuration (paths, settings) |
atmos/stacks/valinor/_config.yaml | Your environment settings — edit this |
atmos/stacks/valinor/_defaults.yaml | Shared defaults for all components |
atmos/stacks/valinor/opennext.yaml | OpenNext component configurations |
atmos/components/terraform/ | Terraform module source code |
Terraform State
Atmos manages Terraform state using an S3 backend. Theatmos bootstrap configure command creates an S3 bucket to store state.
State is isolated per component, so deployments don’t interfere with each other.