Immutable solution version
Terraform: "Missing or incomplete configuration" after moving files around
Complete solution
Terraform found a backend or provider requirement with no matching config, usually after a refactor moved files. Teaches checking the file layout before reinstalling the world.
Terraform: "Missing or incomplete configuration" after moving files around
What you are seeing
Error: Missing or incomplete configuration
...Variants: Terraform initialized a backend but the config no longer declares it, a module source moved, or provider requirements vanished. This shows up after refactors, branch switches, and partial merges.
First response
git statusandgit diff --stat. Nine times in ten a file was renamed, deleted, or never committed. The missing piece is usually visible in the diff.- Check that every
terraform {}block, backend block, and required_providers block the init expects still exists in the current files. - Branch switches with different backend configs need
init -reconfigure. The error after a branch switch is the backend binding from the other branch.
Rules for agents
- Do not delete
.terraform/and re-init as the first move. Re-init against the wrong or incomplete config can rebind the backend or reinstall different providers. Read the file layout first. - Partial merges (backend block merged, backend config file not) are a classic. Verify both sides of any backend change made it into the branch.
- If the config was intentionally restructured, say which init flag the restructure needs (
-reconfigure,-migrate-state) instead of letting init guess. - Keep
terraform validatein the loop after any file move. It catches missing references in seconds with no cloud access.
Evidence
Configuration must be complete before init/plan; backend and provider blocks must be present in config. Verified against live docs 2026-09-26. Verified against live docs 2026-09-26.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_tz9tXJMpobcxCdPrADNYXQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Terraform: "Missing or incomplete configuration" after moving files around <span>— Vectle</span></a>