Inheritance Behavior
The stacks.inherit section controls what sections are inherited when components use metadata.inherits. By default, metadata inheritance is enabled, allowing governance policies and component configurations to be defined once and inherited by all instances.
Configuration
atmos.yaml
Configuration Reference
metadataWhen
true(default), themetadatasection is inherited from base components along withvars,settings,env,backend, andproviders.Environment variable:
ATMOS_STACKS_INHERIT_METADATADefault:
trueExceptions: The following metadata fields are NOT inherited:
metadata.inherits- Defines the inheritance relationship itselfmetadata.type- Component type is per-component and not inherited
Example - Enable metadata inheritance (default):
stacks:
inherit:
metadata: trueExample - Disable metadata inheritance (backwards compatibility):
stacks:
inherit:
metadata: falseWhen disabled, only
vars,settings,env,backend, andprovidersare inherited. Themetadatasection must be defined explicitly in each component.
Use Cases
Version Management
When using versioned component folders, metadata inheritance allows you to define the component version once in a base component:
stacks/catalog/vpc/_defaults.yaml
stacks/orgs/acme/plat/prod/us-east-1.yaml
The benefit: When upgrading to vpc/v3, change metadata.component once in vpc/defaults, and all instances (vpc/primary, vpc/secondary) inherit the new version automatically. No need to update each instance individually.
Governance Policies
Inherit governance settings (locking, workspace patterns, ownership) from base components:
stacks/catalog/critical-infrastructure.yaml
All components inheriting from critical/defaults automatically get the governance settings.
Backwards Compatibility
If metadata inheritance causes issues with existing configurations, disable it:
atmos.yaml
When disabled, components behave as they did before this feature - only vars, settings, env, backend, and providers are inherited.