Skip to main content

Native CI

Atmos brings first-class CI/CD support directly into the CLI. Run Atmos commands in GitHub Actions and get rich job summaries, status checks, output variables, and stored planfile verification — no extra actions required.

Experimental

Quick Start

atmos.yaml

ci:
enabled: true
summary:
enabled: true
output:
enabled: true
variables:
- has_changes
- has_additions
- has_destructions
- plan_summary
checks:
enabled: true

GitHub Actions

- name: Plan
run: atmos terraform plan vpc -s prod
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Deploy
run: atmos terraform deploy vpc -s prod
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CI Configuration

Configure CI providers, job summaries, output variables, status checks, planfile storage, and templates in your atmos.yaml.

Features

Job Summaries

Rich Markdown summaries with resource counts, inline badges, and collapsible diffs written to $GITHUB_STEP_SUMMARY. Includes separate templates for plan and apply results. Templates are fully customizable with Go template syntax.

Outputs

Terraform plan and apply results exported as CI output variables for use in downstream jobs. On GitHub Actions, these are written to $GITHUB_OUTPUT.

Checks

Live commit status checks showing real-time operation progress — "Plan in progress" while running and "3 to add, 1 to change, 0 to destroy" when complete.

Planfile Storage

Store and retrieve planfiles across CI pipeline stages using S3, GitHub Artifacts, or local filesystem. The deploy command downloads stored planfiles, generates a fresh plan, and performs a semantic comparison to detect drift before applying.

Commands

CI features are activated with the --ci flag on existing Terraform commands or automatically when running in a CI environment (e.g. GitHub Actions):

atmos terraform plan [--ci]
Run plan with job summary, output variables, status checks, and planfile upload.
atmos terraform apply [--ci]
Run apply with job summary, output variables, and status checks.
atmos terraform deploy [--ci]
Deploy with stored planfile verification, drift detection, and full CI reporting.
atmos terraform planfile
Manage stored planfiles: upload, download, list, delete, and show.
atmos describe affected --format=matrix
Generate GitHub Actions matrix strategy from affected components.

Providers

Atmos auto-detects the CI environment and selects the appropriate provider:

GitHub Actions
Integrates with GitHub job summaries, commit status checks, and output variables. Requires GITHUB_TOKEN for checks and PR features.
Generic CI
Prints summaries, checks, and outputs to stdout. Useful for local development and testing, or any CI provider without native integration.

Legacy GitHub Actions

GitHub Actions (Legacy)

Community-maintained GitHub Actions for Atmos Terraform operations. These still work but native CI integration is the recommended approach for new projects.