【问题标题】:Error: Failed to query available provider packages; terraform init错误:无法查询可用的提供程序包;地形初始化
【发布时间】:2021-12-28 18:27:51
【问题描述】:
terraform_1.0.11_windows_amd64\Terraform>terraform init

Initializing the backend...

Initializing provider plugins...
- Finding hashicorp/aws versions matching "3.7.0"...
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/aws: could not connect to
│ registry.terraform.io: Failed to request discovery document: Get
│ "https://registry.terraform.io/.well-known/terraform.json": net/http: request canceled while waiting for connection
│ (Client.Timeout exceeded while awaiting headers)
╵

这里有什么问题;我在具有 .tf 的配置文件存在且用户配置文件具有正确凭据的目录中

【问题讨论】:

  • 请提供足够的代码,以便其他人更好地理解或重现问题。

标签: amazon-s3 terraform


【解决方案1】:

由于它看起来像网络错误,这里有一个调试清单,您可以尝试:

  • 直接从浏览器访问 terraform.json URL 然后是命令行 (wget/curl)
  • 使用同一网络上的不同计算机进行测试
  • 在不同的网络中测试

Hashicorp 使用 Fastly 作为 CDN,我已经遇到过公司防火墙通过通用规则无意中阻止了 Fastly 内容。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-08-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-10-24
    • 1970-01-01
    相关资源
    最近更新 更多