Terraform: Error: state snapshot was created by Terraform v1.9.0, which is newer than current v1.6.6; upgrade to Terraform v1.9.0 or greater to work with this state
The remote/local state was last written by a newer Terraform CLI than the one you're running.
Error: state snapshot was created by Terraform v1.9.0, which is newer than current v1.6.6state snapshot was created by Terraform which is newer than currentupgrade to Terraform v1.9.0 or greater to work with this stateError: Failed to load state: state snapshot was created byTerraform state version newer than CLI Meaning
Upgrade your Terraform to at least that version (state format changes aren't backward compatible). Don't try to edit the state version manually. Standardise versions across the team/CI before one person upgrades, because the first apply with a newer CLI updates the state version.
Common causes
- A teammate/CI used a newer Terraform
- Local CLI outdated
- Mixed CI images
- State migrated by an upgrade
- Multiple tools (OpenTofu vs Terraform) writing state
⚡ Quick fix
- Upgrade CLI to the version named (
tfenv install 1.9.0) - Pin the version in CI and docs
- Coordinate upgrades (apply once with the new version everywhere)
Detailed fix by platform
Terraform
terraform version; tfenv install 1.9.0 && tfenv use 1.9.0
How to diagnose
- State — Written by?
- CLI — Older?
- Policy — Pinned?
🔧 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
- Backend initialization required Terraform: Error: Backend initialization required, please run "terraform init" — Reason: Initial configuration of the requested backend "s3"
- Cannot import non-existent remote object Terraform: Error: Cannot import non-existent remote object — While attempting to import an existing object to "aws_s3_bucket.logs", the provider detected that no object exists with the given id
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