Learn ATLANTIS-TERRAFORM with Real Code Examples
Updated Nov 27, 2025
Explain
Atlantis integrates Terraform with Git workflow for automated CI/CD.
Runs `terraform plan` on pull requests and `terraform apply` on merge.
Prevents unsafe Terraform operations on production infrastructure.
Tracks changes and provides comments directly in pull requests.
Supports multi-repository, multi-workspace, and multi-project configurations.
Core Features
Atlantis server - central controller that listens to Git webhooks
Atlantis webhook - triggers plan/apply events
Terraform plan automation - preview infrastructure changes
Terraform apply automation - apply approved changes
GitHub/GitLab/Bitbucket integration - PR comments and approvals
Basic Concepts Overview
Project - a Terraform codebase or module in a repo
Workspace - Terraform workspace for a project
Plan - preview of Terraform changes
Apply - execution of approved Terraform changes
Locking - prevents concurrent `apply` runs
Project Structure
Terraform code directory
atlantis.yaml - project configuration
Backend configuration for state storage
Git repository for code versioning
Optional modules and shared libraries
Building Workflow
Create a Git branch with Terraform changes
Open a pull request
Atlantis runs `terraform plan` and comments in PR
Review and approve changes
Run `terraform apply` via Atlantis comment once approved
Difficulty Use Cases
Beginner: Single repo, single workspace automation
Intermediate: Multi-project repository setup
Advanced: Multi-workspace and multi-repo orchestration
Expert: Enterprise GitOps Terraform pipeline with CI/CD integration
Architect: Multi-cloud Terraform infrastructure with Atlantis workflow enforcement
Comparisons
Atlantis vs Terraform Cloud: GitOps PR automation vs SaaS Terraform management
Atlantis vs Jenkins: PR-level Terraform workflow vs general CI/CD
Atlantis vs GitHub Actions: Git-native automation vs workflow runner
Atlantis vs Spacelift: Open-source vs enterprise SaaS automation
Atlantis vs Terraform Enterprise: PR automation vs managed Terraform lifecycle
Glossary
Project - Terraform code directory configured for Atlantis
Workspace - Terraform workspace
Plan - preview of Terraform changes
Apply - execution of approved changes
atlantis.yaml - configuration file for projects