{
  "id": "terraform/terraform-plan-with-orphan-resources",
  "signature": "Error: Resource instance has been orphaned - it is no longer in the configuration but is tracked in state",
  "signature_zh": "错误：资源实例已被孤立 - 它不再在配置中，但仍在状态中被跟踪",
  "regex": "Resource instance has been orphaned - it is no longer in the configuration but is tracked in state",
  "domain": "terraform",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "A resource was removed from Terraform configuration but its state entry remains, causing plan to show destruction.",
  "root_cause_type": "generic",
  "root_cause_zh": "从 Terraform 配置中移除了一个资源，但其状态条目仍然存在，导致计划显示销毁。",
  "versions": [
    {
      "version": "Terraform v1.2+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Destroys the resource unintentionally; may cause data loss.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "State file corruption risk; terraform state rm is safer.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Run terraform state rm <resource_address> to remove the orphaned resource from state without destroying it",
      "success_rate": 0.95,
      "how": "Run terraform state rm <resource_address> to remove the orphaned resource from state without destroying it",
      "condition": "",
      "sources": []
    },
    {
      "action": "Add the resource back to configuration and run terraform apply to reconcile state",
      "success_rate": 0.85,
      "how": "Add the resource back to configuration and run terraform apply to reconcile state",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "运行 terraform state rm <资源地址> 从状态中移除孤立的资源而不销毁它",
    "将资源重新添加到配置中并运行 terraform apply 以协调状态"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://developer.hashicorp.com/terraform/language/state/resource-behavior#orphaned-resources",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.82,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2023-06-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}