# 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

**Code:** `state snapshot was created by a newer Terraform version` · **Category:** Terraform · **Seen on:** Terraform

The remote/local state was last written by a newer Terraform CLI than the one you're running.

## 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

1. Upgrade CLI to the version named (`tfenv install 1.9.0`)
2. Pin the version in CI and docs
3. Coordinate upgrades (apply once with the new version everywhere)

## Detailed fix by platform

### Terraform

1. `terraform version; tfenv install 1.9.0 && tfenv use 1.9.0`

## How to diagnose

1. **State** — Written by?
2. **CLI** — Older?
3. **Policy** — Pinned?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/terraform/state-snapshot-created-by-newer-terraform)
