Skip to content
Latchkey

Atlantis "plan failed" comment on a pull request in CI

Atlantis runs terraform plan per configured project and posts the result as a PR comment. A "Plan Failed" comment means the underlying plan (init, provider, or HCL error) failed. The captured Terraform output in the comment holds the real cause.

What this error means

Atlantis comments "Plan Failed" (or "ran Plan for dir ... : failed") on the pull request. The status check is red and the plan output block shows a Terraform error.

atlantis
Ran Plan for dir: `prod` workspace: `default`

Plan Failed: running "terraform plan" in "prod": exit status 1
Error: Failed to get existing workspaces: ...

Common causes

The Terraform plan itself failed

Atlantis is a wrapper; the failure is a normal Terraform error (backend auth, provider, invalid HCL) surfaced through the comment.

A misconfigured project or workflow

A wrong directory, workspace, or custom workflow in atlantis.yaml makes the plan run in the wrong place and fail.

How to fix it

Read the captured plan output

  1. Expand the plan output block in the Atlantis comment.
  2. Find the first Error: line and fix it as you would any Terraform plan error.
  3. Comment atlantis plan to re-run for that project.
PR comment
# re-run the plan for the failing project after fixing config
atlantis plan -d prod

Correct the project config

If the plan ran in the wrong dir/workspace, fix the projects entry in atlantis.yaml so the plan targets the right code.

How to prevent it

  • Keep atlantis.yaml project dirs and workspaces accurate.
  • Fix Terraform errors surfaced in the comment, not the wrapper.
  • Use autoplan on the right file paths so only relevant projects plan.

Frequently asked questions

What causes "Atlantis comment: "Plan Failed""?
Atlantis is a wrapper; the failure is a normal Terraform error (backend auth, provider, invalid HCL) surfaced through the comment.
How do I fix Atlantis comment: "Plan Failed"?
Read the captured plan output

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card