Version Pinning
Pin your project to a specific Atmos version using version.use in atmos.yaml. When configured, Atmos automatically downloads the specified version (if not already installed) and re-executes itself, ensuring everyone on your team uses the same version.
Configuration
atmos.yaml
When any atmos command runs, it will:
- Check if the requested version is already installed
- Download and install it automatically if needed
- Re-execute the command with the correct version
Versions are cached in ~/.atmos/bin/cloudposse/atmos/{version}/.
Supported Version Formats
- Exact semver
A specific release version (e.g.,
1.199.0). This is the recommended format for production use.version:
use: "1.199.0"latestResolves to the latest available release from GitHub.
version:
use: "latest"pr:<number>Install from a pull request's build artifacts. Useful for testing changes before they are released.
version:
use: "pr:1234"sha:<hash>Install from a specific commit's build artifacts.
version:
use: "sha:ceb7526"
Command-Line Override
Override the configured version for a single command using the --use-version flag:
atmos --use-version 1.201.0 terraform plan -s mystack
Precedence
Version sources are evaluated in this order (highest to lowest priority):
| Priority | Source | Example |
|---|---|---|
| 1 | --use-version flag | atmos --use-version 1.201.0 terraform plan |
| 2 | ATMOS_VERSION_USE env var | ATMOS_VERSION_USE=1.201.0 atmos terraform plan |
| 3 | ATMOS_VERSION env var | ATMOS_VERSION=1.201.0 atmos terraform plan |
| 4 | version.use in atmos.yaml | version: use: "1.199.0" |
The --use-version flag and ATMOS_USE_VERSION env var both set ATMOS_VERSION_USE internally,
so they share the same priority level.
Environment Variables
ATMOS_USE_VERSIONSpecify which version of Atmos to use. This is the env var equivalent of the
--use-versionflag. Internally, it feeds the flag value which setsATMOS_VERSION_USE.ATMOS_USE_VERSION=1.199.0 atmos terraform plan -s mystackATMOS_VERSION_USEThe internal env var checked directly by the version resolution logic. Set automatically by the
--use-versionflag andATMOS_USE_VERSION. Can also be set directly for highest precedence.ATMOS_VERSION_USE=1.199.0 atmos terraform plan -s mystackATMOS_VERSIONConvenience alias matching conventions used by tools like
tfenvandgoenv. Lower precedence thanATMOS_VERSION_USE.export ATMOS_VERSION=1.199.0
Examples
Pin Project to a Specific Version
atmos.yaml
Environment-Specific Versions with Profiles
Use profiles to specify different versions per environment:
version:
use: "1.201.0" # Latest version for development
version:
use: "1.199.0" # Stable version for production
Activate a profile:
atmos --profile dev terraform plan -s mystack
# Or via environment variable
ATMOS_PROFILE=prod atmos terraform apply -s mystack
CI/CD Pipelines
Pin the version in your CI environment:
jobs:
deploy:
runs-on: ubuntu-latest
env:
ATMOS_VERSION: "1.199.0"
steps:
- uses: actions/checkout@v4
- name: Deploy
run: atmos terraform apply -s production/mystack --auto-approve
Combined with Version Constraints
Use version.use to pin the version and version.constraint to enforce a minimum across the team:
atmos.yaml
See Also
- Version Configuration — Overview of all version settings
- Version Check — Automatic update checking
- Version Constraints — Enforce version requirements
- Atmos Version Management — How-to guide with profiles
- Toolchain Commands — Manage installed tool versions