atmos icon indicating copy to clipboard operation
atmos copied to clipboard

docs: Default value for `metadata.component`

Open mss opened this issue 6 months ago • 1 comments

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

mss avatar Oct 07 '25 10:10 mss

Great feedback! Thanks

osterman avatar Nov 16 '25 18:11 osterman

This has been addressed in subsequent PRs:

Related PRs

  • #1614 - Fixed the default behavior for metadata.component when 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
  • Component Versioning (default behavior explanation): https://atmos.tools/stacks/components#component-versioning

    • States: "By default, if metadata.component is not specified, Atmos uses the component's name as the path."
  • Inheritance: https://atmos.tools/stacks/inheritance

The documentation now includes the dedicated metadata section you requested, with cross-references to related concepts.

osterman avatar Dec 17 '25 05:12 osterman