{
  "id": "terraform/invalid-output-value-type",
  "signature": "Error: Invalid output value: output value type mismatch",
  "signature_zh": "错误：无效的输出值：输出值类型不匹配",
  "regex": "Error: Invalid output value: output value type mismatch",
  "domain": "terraform",
  "category": "type_error",
  "subcategory": null,
  "root_cause": "An output value's declared type does not match the actual type of the expression result.",
  "root_cause_type": "generic",
  "root_cause_zh": "输出值的声明类型与表达式结果的实际类型不匹配。",
  "versions": [
    {
      "version": "Terraform v1.0+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Without type constraint, output may still fail if used elsewhere expecting a specific type.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Hides the type mismatch but may cause downstream failures.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Correct the type declaration to match the expression: e.g., change type = string to type = list(string) if output is a list",
      "success_rate": 0.95,
      "how": "Correct the type declaration to match the expression: e.g., change type = string to type = list(string) if output is a list",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use tostring(), tolist(), etc. to convert the value to the declared type",
      "success_rate": 0.85,
      "how": "Use tostring(), tolist(), etc. to convert the value to the declared type",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "修正类型声明以匹配表达式：例如，如果输出是列表，将 type = string 改为 type = list(string)",
    "使用 tostring()、tolist() 等函数将值转换为声明的类型"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://developer.hashicorp.com/terraform/language/values/outputs#type-constraints",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.83,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-04-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}