Skip to main content

atmos store set

Write a value to a configured store backend. This command creates a new value or updates an existing one. You can supply the value inline. You can also pipe the value in with --stdin. Or, if you run the command in a terminal with no VALUE argument, Atmos prompts you for the value and masks your input. You do not need to declare a key first. You can write any KEY to any configured store.

atmos store set --help
 

Usage

atmos store set STORE KEY [VALUE] [flags]

Examples

# Set a value inline, scoped to a stack and component
atmos store set app-metadata image_tag sha256:abc123 --stack=prod --component=ecs-service

# Set a value interactively with a masked prompt
atmos store set app-metadata image_tag --stack=prod --component=ecs-service

# Read a multi-line value from standard input
cat manifest.json | atmos store set app-metadata deploy_manifest --stdin --stack=prod --component=ecs-service

# Store-global value (no --stack/--component)
atmos store set app-metadata shared_config '{"region":"us-east-1"}'

# Write to a store using a specific identity
atmos store set app-metadata image_tag sha256:abc123 --stack=prod --component=ecs-service --identity=aws/prod-metadata

Arguments

STORE

The name of the configured store backend. This name is a key under stores: in atmos.yaml.

KEY

The key to write.

VALUE

The value to write. This argument is optional. If you omit it, Atmos reads the value from --stdin or from an interactive masked prompt.

Flags

--stack (alias -s)

The Atmos stack to scope the key to. This flag is optional. Omit it to store a global key.

Environment variable: ATMOS_STACK

--component (alias -c)

The Atmos component to scope the key to. This flag is optional. Omit it to store a global key.

Environment variable: ATMOS_COMPONENT

--identity (alias -i)

The identity Atmos uses to access the store backend.

Environment variable: ATMOS_IDENTITY

--stdin

Read the value from standard input. Use this flag to pipe multi-line values, such as JSON manifests.

See Also