{
  "id": "terraform/state-version-mismatch",
  "signature": "Error: state snapshot was created by Terraform v1.7, which is newer than current v1.6",
  "signature_zh": "错误：状态快照由 Terraform v1.7 创建，当前版本为 v1.6，版本不兼容",
  "regex": "state snapshot was created by Terraform v\\d+\\.\\d+.*which is newer than current v\\d+\\.\\d+",
  "domain": "terraform",
  "category": "data_error",
  "subcategory": null,
  "root_cause": "The state file was written by a newer version of Terraform and contains data structures or features not recognized by the older version.",
  "root_cause_type": "generic",
  "root_cause_zh": "状态文件由较新版本的 Terraform 写入，包含旧版本无法识别的数据结构或功能。",
  "versions": [
    {
      "version": "Terraform 1.6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Terraform 1.7.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Terraform 1.7.5",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The state file itself is the problem, not the backend configuration. Reinit doesn't downgrade state.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "State files are complex and interdependent. Manual edits often corrupt the state, causing irreversible damage.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Only the exact version or later that created the state can read it. Jumping to a different version may still fail.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Upgrade your local Terraform to at least v1.7 by downloading from https://www.terraform.io/downloads or using a version manager like tfenv. Then run terraform init.",
      "success_rate": 0.9,
      "how": "Upgrade your local Terraform to at least v1.7 by downloading from https://www.terraform.io/downloads or using a version manager like tfenv. Then run terraform init.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If you must use v1.6, restore a state backup from before the upgrade. Check your backend for automatic versioning (e.g., S3 versioning).",
      "success_rate": 0.75,
      "how": "If you must use v1.6, restore a state backup from before the upgrade. Check your backend for automatic versioning (e.g., S3 versioning).",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use Terraform Cloud or Terraform Enterprise's state management to handle version transitions automatically.",
      "success_rate": 0.85,
      "how": "Use Terraform Cloud or Terraform Enterprise's state management to handle version transitions automatically.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "将本地 Terraform 升级到至少 v1.7，从 https://www.terraform.io/downloads 下载或使用 tfenv 版本管理器。然后运行 terraform init。",
    "如果必须使用 v1.6，从升级前的状态备份中恢复。检查后端是否有自动版本管理（例如 S3 版本控制）。",
    "使用 Terraform Cloud 或 Terraform Enterprise 的状态管理功能自动处理版本转换。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://developer.hashicorp.com/terraform/language/state/versioning",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2024-03-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}