EXAMPLE
Stack Inheritance
Inherit shared component defaults from a catalog and override them per environment — the pattern that eliminates copy-pasted stack config.
Try it out
- Install Atmos
- Try the example
Copy the example into a new directory and make it your own:
atmos init examples/demo-stacks
cd demo-stacks
Follow the README for prerequisites and next steps.
See it in action
RECORDED DEMO Real commands. Real output.
README.md1.7 KB
View on GitHubExample: Demo Stacks
Inherit configuration across environments to eliminate duplication.
Learn more about Stack Inheritance.
What You'll See
- Catalog pattern with base component defaults
- Import to inherit shared configuration
- Environment-specific overrides in deploy stacks
Try It
cd examples/demo-stacks# See how configuration is inherited (--query focuses on the vars section)atmos describe component myapp -s dev --query .varsatmos describe component myapp -s prod --query .vars# Compare the resolved configuration across environmentsatmos describe stacks --components myapp --sections vars
TIP
Drop --query/--sections to see the full resolved configuration, including
imports, inheritance chain, and deps.
Key Files
| File | Purpose |
|---|---|
stacks/catalog/myapp.yaml | Base component configuration (shared defaults) |
stacks/deploy/dev.yaml | Dev environment with imports and overrides |
stacks/deploy/prod.yaml | Prod environment with different overrides |