Configure Dependencies
The dependencies section has four sibling keys: tools (required CLI versions), components (other Atmos components this one depends on), files (file paths whose changes affect this component), and folders (folder paths whose changes affect this component). Tool dependencies pin CLI versions like Terraform, kubectl, or helm; components defines execution ordering between Atmos components, and files/folders declare watch-paths used by atmos describe affected and CI/CD integrations.
Use Cases
- Tool Version Requirements: Ensure components use specific Terraform, kubectl, or helm versions
- Team Consistency: Version-control tool requirements for reproducible deployments
- CI/CD Reliability: Guarantee correct tool versions in automated pipelines
- Execution Order: Deploy dependent components in the correct sequence
- Impact Analysis: Let
atmos describe affectedfind components impacted by changes to other components, files, or folders
Tool Dependencies
The dependencies.tools section declares which CLI tool versions a component requires. Atmos automatically installs and uses the specified versions when executing the component.
Configuration Scopes
Tool dependencies can be defined at multiple levels, with more specific levels taking precedence.
Global Level
Tool versions defined at the root level apply to all components:
Component-Type Level
Tool versions defined under terraform, helmfile, packer, or ansible apply to all components of that type:
Component Level
Tool versions defined within a component override all higher-level settings:
Version Resolution
Tool dependencies support multiple version formats:
- Exact version
Use a specific version:
"1.9.8"- Latest version
Use the latest available version:
"latest"- Semver constraint (planned)
Use semantic version ranges:
">=1.8.0","~>1.9.0"
Inheritance and Merge Behavior
Tool dependencies are merged from the most general to the most specific level:
- Global
dependencies.tools(applies to all components) - Component-type
terraform.dependencies.tools(applies to all components of that type) - Component
components.terraform.<name>.dependencies.tools(applies to specific component)
More specific levels override less specific levels. For example:
Result:
- Most Terraform components use Terraform 1.9.8
legacy-vpccomponent uses Terraform 1.5.0- All Terraform components use tflint 0.44.1
Integration with Toolchain
Tool dependencies integrate seamlessly with the toolchain management system:
- Automatic Installation: When you run a component, Atmos installs the required tool versions automatically
- Version Isolation: Each component uses its declared versions, isolated from other components
- Cache Efficiency: Tools are cached and reused across components with the same version requirements
Example workflow:
# Component declares terraform: "1.9.8"
atmos terraform plan vpc -s prod
# Atmos automatically:
# 1. Checks if terraform 1.9.8 is installed
# 2. Installs it if missing (from toolchain registries)
# 3. Executes: terraform plan (using 1.9.8)
Complete Tool Dependencies Example
Component Dependencies
The dependencies.components section declares ordering relationships between Atmos components. Use it to express that one component must be applied before another. These dependencies are used by atmos describe dependents to find downstream consumers, by atmos describe affected to propagate impact through the dependency graph, and by CI/CD integrations (such as Spacelift) to apply components in the correct order.
For the full reference — cross-stack dependencies, cross-type (kind) dependencies, merge behavior, and migration from settings.depends_on — see the dedicated Component Dependencies page.
Quick Example
File and Folder Dependencies
The dependencies.files and dependencies.folders sibling keys declare path-based dependencies. When atmos describe affected detects a change to one of these paths, the declaring component is marked as affected — even when no component code or stack configuration changed.
Use this to wire components to external assets like Lambda source code, configuration files, or schema definitions that live outside the component directory.
The kind: file / kind: folder entries inside dependencies.components[] (shipped in v1.210.0) still parse and behave identically. New configurations should prefer the dependencies.files and dependencies.folders sibling keys for clarity.
Best Practices
- Pin Versions Explicitly - Use exact versions (
"1.9.8") instead of"latest"for production - Consistent Team Standards - Define global defaults in
_defaults.yamlfiles - Component-Specific Overrides - Only override when necessary (legacy code, compatibility)
- Document Reasons - Add comments explaining why a component uses a different version
- Test Before Upgrading - Test tool version changes in dev/staging before production
Related Documentation
- Component Dependencies - Detailed component dependency configuration
- Toolchain Management - Installing and managing CLI tools
- Toolchain Configuration - Configuring toolchain behavior
- Legacy
settings.depends_on- Deprecated dependency format (kept for reference) - YAML Functions - Using
!terraform.outputand other functions for cross-component dependencies atmos describe affected- Detect components affected by changes