Stack Configuration
Stacks are YAML files that configure your environments. They define which components to deploy, with what settings, and how they relate to each other. This is where configuration lives—separate from your Terraform code.
Configuration Sections
Stack manifests support various configuration sections at different scopes:
| Section | Description | Scopes |
|---|---|---|
| name | Explicit stack name override | Stack manifest only |
| vars | Variables passed to components | Global, component-type, component |
| locals | File-scoped temporary variables | Global, component-type, component |
| env | Environment variables | Global, component-type, component |
| settings | Integrations and metadata | Global, component-type, component |
| metadata | Component behavior and inheritance | Component only |
| hooks | Lifecycle event handlers | Global, component-type, component |
| command | Override default executable | Component-type, component |
| backend | Terraform state storage | Component-type, component |
| providers | Terraform provider configuration | Component-type, component |
| auth | Authentication configuration | Global (atmos.yaml), component |
Component Types
Atmos supports four component types, each with specific configuration options:
| Type | Purpose | Documentation |
|---|---|---|
| Terraform | Infrastructure as Code | Cloud resources, networking, IAM |
| Helmfile | Kubernetes deployments | Helm chart releases |
| Packer | Machine image building | AMIs, VM images |
| Ansible | Configuration management | Playbook automation |
Composition and Reuse
Build maintainable configurations using these patterns:
| Pattern | Description |
|---|---|
| Imports | Include configuration from other files |
| Catalogs | Reusable component configurations |
| Inheritance | Inherit settings between components |
| Overrides | Override inherited configuration |
| Mixins | Composable configuration snippets |
| dependencies | Define tool and component dependencies |
Sharing State
Share data between components and stacks:
| Topic | Description |
|---|---|
| Remote State | Access Terraform state from other components |
| Share Data | Share configuration between components |
Describing Stacks
Use atmos describe stacks to view the fully computed, deep-merged configuration of any stack. This is invaluable for debugging and understanding what configuration will actually be applied.
# View all stacks
atmos describe stacks
# Filter by specific stack
atmos describe stacks --stack plat-ue2-prod
# Filter by component and section
atmos describe stacks --components vpc --sections vars
# Output as JSON for processing with jq
atmos describe stacks --format json | jq '.["plat-ue2-prod"]'
The output shows the final resolved configuration after all imports, inheritance, and overrides have been applied. Use --sections to filter output to specific sections like vars, env, settings, metadata, backend, or workspace.
Use the auth section to configure credential management for cloud providers and external services.
Use the backend section to generate Terraform backend configuration files for state storage.
Use the command setting to override the default executable for Terraform, Helmfile, Packer, or Ansible.
6 items
1 item
Use the env section to set environment variables for your Terraform, Helmfile, Packer, or Ansible components.
Use the generate section to create auxiliary configuration files for Terraform components.
Use lifecycle hooks to take action at various points in the lifecycle of your components.
Imports let you split stack configurations across multiple files and reuse them. Each import is deep-merged on top of previous imports, building up the final configuration.
Use the locals section to define file-scoped temporary variables that reduce repetition and improve readability.
Use the name field to explicitly set a stack's logical name, or use name_template for programmatic naming.
Use the 'Component Overrides' pattern to modify components' configuration and behavior in the current scope.
Use the providers section to generate Terraform provider configuration files for your components.
1 item
Use the vars section to pass variables to your Terraform, Helmfile, Packer, or Ansible components.