{
  "id": "terraform/invalid-required-providers-block",
  "signature": "Error: Invalid required_providers block: duplicate required_providers block",
  "signature_zh": "错误：无效的 required_providers 块：重复的 required_providers 块",
  "regex": "duplicate required_providers block",
  "domain": "terraform",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "Multiple required_providers blocks exist in the same module, which Terraform does not allow.",
  "root_cause_type": "generic",
  "root_cause_zh": "同一模块中存在多个 required_providers 块，这是 Terraform 不允许的。",
  "versions": [
    {
      "version": "1.5.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "1.7.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Merging the blocks with incorrect syntax still results in a duplicate block error.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Adding a required_providers block inside a submodule does not fix the root module; the error is per module.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Consolidate all provider requirements into a single required_providers block in the root module. Remove any duplicate blocks.",
      "success_rate": 0.95,
      "how": "Consolidate all provider requirements into a single required_providers block in the root module. Remove any duplicate blocks.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If using Terraform 1.5+, use the 'required_providers' attribute in a single block, combining all entries.",
      "success_rate": 0.9,
      "how": "If using Terraform 1.5+, use the 'required_providers' attribute in a single block, combining all entries.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "将所有提供者需求合并到根模块中的单个 required_providers 块中。删除任何重复的块。",
    "如果使用 Terraform 1.5+，在单个块中使用 'required_providers' 属性，合并所有条目。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://developer.hashicorp.com/terraform/language/providers/requirements",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.84,
  "fix_success_rate": 0.95,
  "resolvable": "true",
  "first_seen": "2023-09-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}