{
  "id": "terraform/state-lock-dynamodb-conditional-check-failed",
  "signature": "Error acquiring the state lock: ConditionalCheckFailedException: The conditional request failed: The conditional request failed",
  "signature_zh": "获取状态锁失败：ConditionalCheckFailedException：条件请求失败",
  "regex": "Error acquiring the state lock: ConditionalCheckFailedException.*",
  "domain": "terraform",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "DynamoDB state lock table's condition expression failed, typically because another process holds the lock or the lock record is stale.",
  "root_cause_type": "generic",
  "root_cause_zh": "DynamoDB 状态锁表的条件表达式失败，通常是因为另一个进程持有锁或锁记录已过期。",
  "versions": [
    {
      "version": "Terraform 1.5",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Terraform 1.6",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Terraform 1.7",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "AWS Provider 5.0+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Deleting the table loses all lock metadata and may cause state corruption if another process is actively using it.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Disabling locks risks concurrent writes and state corruption. Only safe for one-off operations.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Force unlock the state: terraform force-unlock LOCK_ID",
      "success_rate": 0.85,
      "how": "Force unlock the state: terraform force-unlock LOCK_ID",
      "condition": "",
      "sources": []
    },
    {
      "action": "Manually delete the lock item from DynamoDB table using AWS CLI: aws dynamodb delete-item --table-name terraform-locks --key '{\"LockID\": {\"S\": \"<state-file-path>\"}}'",
      "success_rate": 0.95,
      "how": "Manually delete the lock item from DynamoDB table using AWS CLI: aws dynamodb delete-item --table-name terraform-locks --key '{\"LockID\": {\"S\": \"<state-file-path>\"}}'",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Force unlock the state: terraform force-unlock LOCK_ID",
    "Manually delete the lock item from DynamoDB table using AWS CLI: aws dynamodb delete-item --table-name terraform-locks --key '{\"LockID\": {\"S\": \"<state-file-path>\"}}'"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://developer.hashicorp.com/terraform/language/state/locking",
  "official_doc_section": null,
  "error_code": "ConditionalCheckFailedException",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-05-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}