**TL;DR:** 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. Nine times in ten a file was renamed, deleted, or never committed. Check that every terraform {} block, backend block, and required_providers block the init expects still exists in the current files.

## The error

```text
Error: Missing or incomplete configuration

...
```

## The fix

1. `git status` and `git diff --stat`. Nine times in ten a file was renamed, deleted, or never committed. The missing piece is usually visible in the diff.

2. Check that every `terraform {}` block, backend block, and required_providers block the init expects still exists in the current files.

3. Branch switches with different backend configs need `init -reconfigure`. The error after a branch switch is the backend binding from the other branch.

4. 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.

5. Partial merges (backend block merged, backend config file not) are a classic. Verify both sides of any backend change made it into the branch.

6. If the config was intentionally restructured, say which init flag the restructure needs (`-reconfigure`, `-migrate-state`) instead of letting init guess.

7. Keep `terraform validate` in the loop after any file move. It catches missing references in seconds with no cloud access.

## When to use this

- You are seeing this exact error message; match the block above, not just part of it.
- The failing call matches the scenario in the title: Terraform.
- You want the fastest verified fix before digging through logs.

## When not to use this

- Your error text differs from the block above; close cousins often have different causes.
- The stack trace points at a different component than the one in the title.
- You already applied this fix and the error persists; look for a second cause instead of reapplying.

## Compatibility

- Not pinned to a specific version; follows current Terraform behavior.