# Error: state snapshot was created by Terraform v1.6, which is newer than current v1.5

- **ID:** `terraform/state-version-mismatch-major-upgrade`
- **Domain:** terraform
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 95%

## Root Cause

The Terraform state file was written by a newer version of Terraform (v1.6) and cannot be read by the older version (v1.5) due to incompatible state format changes.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Terraform v1.5.0 | active | — | — |
| Terraform v1.6.0 | active | — | — |
| Terraform v1.7.0 | active | — | — |

## Workarounds

1. **Upgrade the local Terraform version to match or exceed the version that wrote the state: install Terraform v1.6 or later via `tfenv install 1.6.0 && tfenv use 1.6.0`** (100% success)
   ```
   Upgrade the local Terraform version to match or exceed the version that wrote the state: install Terraform v1.6 or later via `tfenv install 1.6.0 && tfenv use 1.6.0`
   ```
2. **If you must use an older version, restore a state backup from before the newer version was used (if available): `aws s3 cp s3://bucket/terraform.tfstate.backup terraform.tfstate`** (70% success)
   ```
   If you must use an older version, restore a state backup from before the newer version was used (if available): `aws s3 cp s3://bucket/terraform.tfstate.backup terraform.tfstate`
   ```

## Dead Ends

- **** — Terraform does not support backward state compatibility. Once state is written by a newer version, older versions cannot parse it. (100% fail)
- **** — The state format is not just a version number; the internal serialization changed. Editing the version field corrupts the state and may cause data loss. (100% fail)
