Terraform: Error: Backend initialization required, please run "terraform init" — Reason: Initial configuration of the requested backend "s3"
Terraform needs terraform init to set up the backend (new directory, changed backend config, missing .terraform).
Error: Backend initialization required, please run "terraform init"Reason: Initial configuration of the requested backend "s3"Backend initialization required: please run "terraform init"Error: Backend configuration changedError: Module not installed. Run "terraform init" to install all modules required by this configuration Meaning
Run terraform init. If the message says "Backend configuration changed", use terraform init -reconfigure (keep state in the new config) or -migrate-state (move state between backends). CI must always run init (cache .terraform carefully).
Common causes
- Fresh checkout without
.terraform - Backend block added/changed
- Different
-backend-configvalues .terraformdeleted/not cached in CI- Switched workspaces/dirs
⚡ Quick fix
terraform init(or-reconfigure/-migrate-state)- Pass the same
-backend-configin CI - Don't commit
.terraform; do init in every job
Detailed fix by platform
Terraform
terraform init -reconfigure -backend-config=backend.hcl
How to diagnose
- Reason — New or changed?
- Config — backend-config same?
- CI — init run?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- Backend configuration changed (migrate or reconfigure) Terraform: Error: Backend configuration changed — A change in the backend configuration has been detected, which may require migrating existing state
- DynamoDB lock table not found (ResourceNotFoundException) Terraform: Error: Error acquiring the state lock: ResourceNotFoundException: Requested resource not found / failed to retrieve lock info
- Error acquiring the state lock Terraform: Error: Error acquiring the state lock — ConditionalCheckFailedException / state blob is already locked
Most viewed in Terraform
- Inconsistent dependency lock file Terraform: Error: Inconsistent dependency lock file — provider x: required by this configuration but no version is selected
- Reference to undeclared resource Terraform: Error: Reference to undeclared resource / Reference to undeclared input variable
- Resource is tainted and must be replaced Terraform: # aws_instance.web is tainted, so must be replaced — -/+ destroy and then create replacement
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026