{
  "id": "terraform/conflicting-provider-version-constraints",
  "signature": "Error: Conflicting provider version constraints: multiple modules require different versions of provider X",
  "signature_zh": "错误：冲突的提供程序版本约束：多个模块要求提供程序 X 的不同版本",
  "regex": "Error: Conflicting provider version constraints: multiple modules require different versions of provider",
  "domain": "terraform",
  "category": "module_error",
  "subcategory": null,
  "root_cause": "Two or more modules in the configuration specify incompatible version constraints for the same provider, causing Terraform to fail dependency resolution.",
  "root_cause_type": "generic",
  "root_cause_zh": "配置中的两个或多个模块为同一提供程序指定了不兼容的版本约束，导致 Terraform 依赖解析失败。",
  "versions": [
    {
      "version": "Terraform >=1.3",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "AzureRM Provider 3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "AWS Provider 5.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Terraform may default to the latest provider version, which could be incompatible with existing state or resources.",
      "fail_rate": 0.55,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The lock file is managed by Terraform and manual edits are not preserved; also risks provider corruption.",
      "fail_rate": 0.75,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Align version constraints across all modules. For example, in root module set `required_providers { aws = \"~> 5.0\" }` and ensure all child modules use `aws = \">= 5.0, < 6.0\"`.",
      "success_rate": 0.9,
      "how": "Align version constraints across all modules. For example, in root module set `required_providers { aws = \"~> 5.0\" }` and ensure all child modules use `aws = \">= 5.0, < 6.0\"`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use `terraform providers` to inspect version requirements, then update constraints to a common range, e.g., `version = \"~> 5.0\"` in all modules.",
      "success_rate": 0.85,
      "how": "Use `terraform providers` to inspect version requirements, then update constraints to a common range, e.g., `version = \"~> 5.0\"` in all modules.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在所有模块中对齐版本约束。例如，在根模块设置 `required_providers { aws = \"~> 5.0\" }`，并确保所有子模块使用 `aws = \">= 5.0, < 6.0\"`。",
    "使用 `terraform providers` 检查版本要求，然后将约束更新为公共范围，例如在所有模块中使用 `version = \"~> 5.0\"`。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://developer.hashicorp.com/terraform/language/providers/requirements#version-constraints",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-08-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}