docs: Default value for `metadata.component`
Describe the Feature
The documentation at https://atmos.tools/core-concepts/stacks/define-components/#terraform-schema rightly specifies the metadata (and thus also metadata.component) section as optional. It doesn't say though what the default value in that case is.
I think it is the equivalent of the basename of the component name as found in the stack definition (ie. the last list entry of that name if split by slashes).
Expected Behavior
The documentation should fully describe the metadata section.
Use Case
Debugging some weird error messages with broken/misconfigured inheritance.
Describe Ideal Solution
I'd add a dedicated documentation section describing the metadata section and move the enabled and locked attribute there as well. It should also describe the other inheritance related field, probably by just linking to the pages where those are described in detail.
Alternatives Considered
Digging through the source code.
Additional Context
No response
Great feedback! Thanks
This has been addressed in subsequent PRs:
Related PRs
-
#1614 - Fixed the default behavior for
metadata.componentwhen not explicitly set (regression fix) - #1840 - Added comprehensive documentation for all metadata fields and restructured for better discoverability
Documentation Links
-
Component Metadata Reference: https://atmos.tools/stacks/components/component-metadata
- Documents all metadata fields:
component,name,inherits,type,enabled,locked,terraform_workspace,terraform_workspace_pattern,custom
- Documents all metadata fields:
-
Component Versioning (default behavior explanation): https://atmos.tools/stacks/components#component-versioning
- States: "By default, if
metadata.componentis not specified, Atmos uses the component's name as the path."
- States: "By default, if
-
Inheritance: https://atmos.tools/stacks/inheritance
The documentation now includes the dedicated metadata section you requested, with cross-references to related concepts.