Automate Terraform plan and apply workflows with Atlantis on pull requests

domain: runatlantis.io · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Deploy Atlantis as a Kubernetes Deployment or Docker container; expose it via an ingress with a public HTTPS endpoint for webhook delivery.
  2. Configure a GitHub or GitLab webhook pointing at `https://<ATLANTIS_HOST>/events` with events: push and pull_request; set the webhook secret as `ATLANTIS_GH_WEBHOOK_SECRET`.
  3. Set environment variables `ATLANTIS_GH_USER`, `ATLANTIS_GH_TOKEN`, and `ATLANTIS_REPO_ALLOWLIST` (e.g., `github.com/your-org/*`) in the Atlantis deployment.
  4. On a pull request, Atlantis automatically runs `atlantis plan` for any changed Terraform directories; comment `atlantis apply` on the PR to apply after review.
  5. Create a `atlantis.yaml` in the repository root to define custom workflows, directory mappings, and pre/post hooks (e.g., running `checkov` or `infracost` before plan).
  6. Use Atlantis's locking mechanism: once a plan is run for a directory, that directory is locked until `atlantis apply` or `atlantis unlock` is called, preventing concurrent conflicting applies.

Known gotchas

Related routes

Use the HCP Terraform API to programmatically trigger a speculative plan, poll for its completion, and parse the structured plan output to enforce a cost policy gate in CI
Terraform / HCP Terraform · 6 steps · unrated
Set up Atlantis custom workflow with pre-plan Checkov scan and Infracost comment hooks
runatlantis.io · 6 steps · unrated
Scan Terraform and Kubernetes IaC files with Checkov and output SARIF for GitHub code scanning
checkov.io · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans