Skip to content
Latchkey

Digger plan failed in CI

Digger orchestrates Terraform inside your CI (GitHub Actions and others) based on digger.yml projects. A plan failure is the wrapped terraform plan exiting non-zero. The Digger PR comment (and the Action log) carries the real Terraform error.

What this error means

A Digger run reports a failed plan for a project, and the PR comment or Action log shows a Terraform error such as a backend or provider failure. The Digger step exits non-zero.

digger
Digger run failed for project "prod"

Error: Failed to load state: AccessDenied: User is not authorized to perform:
s3:GetObject on the backend bucket

Common causes

The wrapped terraform plan failed

Digger runs Terraform; the failure is a standard plan error (backend auth, provider, HCL) surfaced through the run.

Project or dir misconfiguration in digger.yml

A wrong dir, workspace, or terragrunt setting in digger.yml makes the plan run against the wrong code and fail.

How to fix it

Read the plan output and fix Terraform

  1. Open the Digger comment or the Action log and find the first Error: line.
  2. Fix it as a normal Terraform plan error (credentials, backend, config).
  3. Comment digger plan to re-run for that project.
PR comment
digger plan -p prod

Correct the project definition

If the plan ran in the wrong place, fix the project's dir/workspace in digger.yml.

digger.yml
projects:
  - name: prod
    dir: prod

How to prevent it

  • Keep digger.yml project dirs accurate.
  • Provide backend/provider credentials to the Digger step.
  • Fix Terraform errors in the plan output, not the orchestrator.

Frequently asked questions

What causes "Digger: plan failed"?
Digger runs Terraform; the failure is a standard plan error (backend auth, provider, HCL) surfaced through the run.
How do I fix Digger: plan failed?
Read the plan output and fix Terraform

Related guides

References

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