Skip to main content

atmos stack config set

Set a component-relative value for a component in a stack. Atmos uses provenance to find the manifest file that defines the effective value and edits that file in place, preserving comments, anchors/aliases, Atmos YAML functions, and Go templates. This is the canonical form; atmos stack set is a convenience alias for this command.

atmos stack config set --help

Usage

atmos stack config set <path> <value> -s <stack> -c <component> [--type <type>] [--file <manifest>]

Examples

# Set the value where it currently resolves from.
atmos stack config set vars.region us-west-2 -s plat-ue2-prod -c vpc

# Typed value.
atmos stack config set settings.spacelift.workspace_enabled true --type=bool -s plat-ue2-prod -c vpc

# Edit (or create the key in) a specific manifest.
atmos stack config set vars.new_flag yes --file stacks/deploy/prod.yaml -s plat-ue2-prod -c vpc

Arguments

<path> (required)
Component-relative dot-notation path (e.g. vars.region).
<value> (required)
The value to set, interpreted according to --type.

Flags

--stack / -s (string, required)
The stack name.
--component / -c (string, required)
The component name.
--type (string, default string)
How to interpret <value>: string, int, bool, float, null, or yaml (raw literal).
--file (string)
Edit this manifest explicitly instead of resolving via provenance. Required when the value is not yet defined anywhere; can also be used to create new keys.
note

Edits that would alter or expand a YAML anchor or alias are rejected to avoid silently mutating shared data, as are multi-document manifests and manifests that define the same anchor name more than once. Comments, anchors, indentation width, and line endings (CRLF/LF) are preserved, but blank lines between entries are dropped and non-indented sequence styles are normalized when a file is edited.