{
  "id": "terraform/invalid-required-providers-version-constraint",
  "signature": "Error: Invalid required_providers version constraint: \"~> 3.0, < 4.0\" is not a valid version constraint string",
  "signature_zh": "错误：无效的 required_providers 版本约束：\"~> 3.0, < 4.0\" 不是有效的版本约束字符串",
  "regex": "Invalid required_providers version constraint.*is not a valid version constraint string",
  "domain": "terraform",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The version constraint syntax in required_providers is malformed or uses unsupported operators.",
  "root_cause_type": "generic",
  "root_cause_zh": "required_providers 中的版本约束语法格式错误或使用了不支持的运算符。",
  "versions": [
    {
      "version": "Terraform v1.5.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "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"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Remove the version constraint entirely and run terraform init",
      "why_fails": "Without constraints, Terraform may install a newer incompatible provider version.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a comma instead of spaces between constraints: \"~> 3.0,< 4.0\"",
      "why_fails": "The comma is still invalid; Terraform requires spaces or newlines between constraints.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Wrap the constraint in double quotes inside the block",
      "why_fails": "The error is about the constraint string syntax, not quoting.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use a single constraint without commas: `version = \"~> 3.0\"` or use multiple constraints with newlines: `version = [\">= 3.0\", \"< 4.0\"]`",
      "success_rate": 0.95,
      "how": "Use a single constraint without commas: `version = \"~> 3.0\"` or use multiple constraints with newlines: `version = [\">= 3.0\", \"< 4.0\"]`",
      "condition": "",
      "sources": []
    },
    {
      "action": "Correct the syntax to use a list: `version = [\">= 3.0\", \"< 4.0\"]` and run 'terraform init'",
      "success_rate": 0.95,
      "how": "Correct the syntax to use a list: `version = [\">= 3.0\", \"< 4.0\"]` and run 'terraform init'",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Use a single constraint without commas: `version = \"~> 3.0\"` or use multiple constraints with newlines: `version = [\">= 3.0\", \"< 4.0\"]`",
    "Correct the syntax to use a list: `version = [\">= 3.0\", \"< 4.0\"]` and run 'terraform init'"
  ],
  "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.88,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2024-08-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}