{
  "id": "terraform/provider-version-constraint-failed",
  "signature": "Error: Failed to query available provider packages: could not retrieve the list of available versions for provider hashicorp/aws: the provider registry at registry.terraform.io returned status 403 Forbidden",
  "signature_zh": "错误：无法查询可用的 provider 包：无法检索 provider hashicorp/aws 的可用版本列表：registry.terraform.io 返回状态码 403 Forbidden",
  "regex": "Failed to query available provider packages.*returned status 403 Forbidden",
  "domain": "terraform",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "Network access to the Terraform registry is blocked by a firewall or proxy, or API credentials for the registry are missing or invalid.",
  "root_cause_type": "generic",
  "root_cause_zh": "对 Terraform 注册表的网络访问被防火墙或代理阻止，或者注册表的 API 凭据缺失或无效。",
  "versions": [
    {
      "version": "Terraform 1.5.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Terraform 1.6.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Terraform 1.7.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The issue is network access, not cached provider versions. The upgrade flag doesn't bypass the 403 error.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "If the proxy itself is misconfigured or requires authentication, the 403 persists. The registry might also block known proxy IPs.",
      "fail_rate": 0.65,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The lock file is irrelevant to registry access. Deleting it only removes version constraints, not the network issue.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Configure Terraform to use a local mirror or private registry that is accessible. Update the .terraformrc or terraform.rc file with a provider_installation block.",
      "success_rate": 0.85,
      "how": "Configure Terraform to use a local mirror or private registry that is accessible. Update the .terraformrc or terraform.rc file with a provider_installation block.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Ensure network access: add registry.terraform.io to the allowlist in your firewall/proxy, or use a corporate proxy with proper authentication.",
      "success_rate": 0.8,
      "how": "Ensure network access: add registry.terraform.io to the allowlist in your firewall/proxy, or use a corporate proxy with proper authentication.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use a provider version that is already cached in the local filesystem mirror. Run terraform providers mirror /path/to/mirror on a machine with access.",
      "success_rate": 0.75,
      "how": "Use a provider version that is already cached in the local filesystem mirror. Run terraform providers mirror /path/to/mirror on a machine with access.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "配置 Terraform 使用可访问的本地镜像或私有注册表。在 .terraformrc 或 terraform.rc 文件中添加 provider_installation 块。",
    "确保网络访问：将 registry.terraform.io 添加到防火墙/代理的白名单中，或使用具有正确身份验证的企业代理。",
    "使用已缓存在本地文件系统镜像中的 provider 版本。在可访问网络的机器上运行 terraform providers mirror /path/to/mirror。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://developer.hashicorp.com/terraform/cli/config/config-file#provider-installation",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-06-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}