{
  "id": "terraform/plan-output-encoding-error",
  "signature": "Error: The plan output exceeds the maximum allowed size of 4 MB; try reducing the number of resources or using a binary plan file",
  "signature_zh": "错误：计划输出超过最大允许大小 4 MB；请尝试减少资源数量或使用二进制计划文件",
  "regex": "The plan output exceeds the maximum allowed size of 4 MB",
  "domain": "terraform",
  "category": "encoding_error",
  "subcategory": null,
  "root_cause": "The JSON-formatted plan output is too large (over 4 MB) due to an excessive number of resources or large attribute values.",
  "root_cause_type": "generic",
  "root_cause_zh": "由于资源数量过多或属性值过大，JSON 格式的计划输出过大（超过 4 MB）。",
  "versions": [
    {
      "version": "Terraform v1.6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Terraform v1.7.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Terraform v1.8.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The JSON output is what exceeds the limit, not the binary plan.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Complex dependencies between resources may cause state fragmentation.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Apply may still fail or produce unexpected results without a plan.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use 'terraform plan -out=plan.tfplan' to generate a binary plan file instead of JSON output, which has no size limit.",
      "success_rate": 0.95,
      "how": "Use 'terraform plan -out=plan.tfplan' to generate a binary plan file instead of JSON output, which has no size limit.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If you need JSON output, reduce the plan scope with 'terraform plan -target=resource_type.name' to focus on specific resources.",
      "success_rate": 0.85,
      "how": "If you need JSON output, reduce the plan scope with 'terraform plan -target=resource_type.name' to focus on specific resources.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use 'terraform plan -compact-warnings' and 'terraform plan -no-color' to reduce output verbosity.",
      "success_rate": 0.75,
      "how": "Use 'terraform plan -compact-warnings' and 'terraform plan -no-color' to reduce output verbosity.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "使用 'terraform plan -out=plan.tfplan' 生成二进制计划文件而不是 JSON 输出，没有大小限制。",
    "如果需要 JSON 输出，使用 'terraform plan -target=资源类型.名称' 减少计划范围，专注于特定资源。",
    "使用 'terraform plan -compact-warnings' 和 'terraform plan -no-color' 减少输出冗余。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://developer.hashicorp.com/terraform/cli/commands/plan#plan-output-size",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-02-01",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}