Folder Structure
Atmos discovers your components (Terraform root modules, Helmfile releases, etc.) and stack configurations based on paths you define in atmos.yaml. The folder structure is fully customizableβorganize however makes sense for your project.
You will learn
- How to organize your project on the file system
- How to separate configuration from components
- Different ways to organize your project
Recommended Filesystem Layoutβ
Atmos is fully configurable, and you can organize your project in any way that makes sense for your team by adjusting the paths in atmos.yaml. We also provide detailed guidance on organizing your folder structure, whether it's for a simple project or enterprise-scale architecture in our Design Patterns section. For complex organizational structures, see the Organizational Structure Configuration pattern. Choose the model that best fits the stage you plan to reach when you complete the project.
Here's a simple layout, if you just have 3 deployments for things like dev, staging, and prod:
βββ components/ # Folder containing all your components, usually organized by toolchain
β βββ terraform/ # Folder for all Terraform "root modules"
βββ stacks/
βββ deploy/ # Folder for deployable stacks
β βββ dev/ # Folder for development environment configurations
β βββ staging/ # Folder for staging environment configurations
β βββ prod/ # Folder for production environment configurations
βββ catalog/ # Folder for the service catalog
βββ schemas/ # Folder for the schema validations
βββ workflows/ # Folder for workflows that operate on top of stacks
The folder structure is fully customizable via base_path settings. If you only use Terraform (no Helmfile or other toolchains), you could use base_path: "terraform", base_path: "components", or even base_path: ".". The components/terraform convention exists because Atmos supports multiple toolchains, but organize however makes sense for your project.
Alternatively, here's a more complex layout for a larger project broken into multiple organizations, organizational units, and environments:
βββ components/ # Folder containing all your components, usually organized by toolchain
β βββ terraform/ # Folder for all Terraform "root modules"
βββ stacks/
βββ orgs/ # Folder for deployable stacks
β βββ acme/ # Folder for the Acme organization
β βββ core/ # OU for core services
β β βββ security/ # Folder for security-related configurations
β β βββ audit/ # Folder for audit-related configurations
β β βββ identity/ # Folder for identity management configurations
β β βββ network/ # Folder for networking-related configurations
β βββ plat/ # OU for platform environments
β βββ dev/ # Folder for development environment configurations
β βββ staging/ # Folder for staging environment configurations
β βββ prod/ # Folder for production environment configurations
βββ catalog/ # Folder for the service catalog
βββ schemas/ # Folder for the schema validations
βββ workflows/ # Folder for workflows that operate on top of stacks
Note, that these are just a couple of examples.
components/- folder containing all your components, usually organized by your toolchain
components/terraform- folder for all Terraform "root modules"
stacks/orgs/- folder for deployable stacks
stacks/catalog/- folder for the service catalog
stacks/workflows/- folder for workflows that operate on top of stacks.
You can find some demos of how we organize projects in the Atmos GitHub repository under the examples/ folder. Or check out our Reference Architecture for AWS for a more detailed look at how we organize our projects.
To effectively organize an Atmos project, we want to ensure you have specific locations for Atmos to find your stack configurations and components. At a minimum, we recommend the following folder structure in your project:
Components Folderβ
This folder contains your components, organized by toolchain. Each toolchain has its own base_path setting in atmos.yaml:
- Terraform/OpenTofu:
components/terraform/β Contains your Terraform root modules - Helmfile:
components/helmfile/β Contains your Helmfile releases
For Terraform users: Atmos only discovers root modules