atmos auth exec
Run any tool (Terraform, AWS CLI, kubectl, etc.) with the right cloud identity injected automatically into the environment. Use exec
when you want a one-off command to inherit secure, temporary credentials without polluting your shell session.
Usage​
atmos auth exec [--identity <name>] -- <command> [args...]
Arguments​
- command
- The program to execute with authentication environment variables set.
- args...
- Arguments to pass through to the command.
Examples​
# Run terraform with authenticated env
atmos auth exec -- terraform plan -var-file=env.tfvars
# Use a specific identity
atmos auth exec --identity prod-admin -- aws sts get-caller-identity
# Inspect env
atmos auth exec -- env | grep AWS
Flags​
--identity
(alias-i
)- Specify the identity to use. If omitted, the default identity is used.
Notes​
--
is required to stop Atmos flag parsing; everything after is passed to the subcommand.