terraform - 我正在尝试运行 terraform init 但收到此错误:无法查询可用的提供程序包
问题描述
Terraform init 给出以下错误。没有版本升级,几天前它还在工作,但突然它失败了。
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": read: connection reset by peer
when I run curl from the server, it is not able to connect as well.
curl https://registry.terraform.io/
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to registry.terraform.io:443
解决方案
您是否在管理员可能在您和 Internet 之间安装了代理的网络上?如果是这样,您需要获取签名证书并在您的提供程序中配置它们。
如果您在家庭网络或公共网络上,这是中间人攻击。请勿使用此网络。
如果您有证书,则可以通过在您的 aws 提供程序中配置它们,方法是指向cacert_path
,cert_path
并指向key_path
相应的.pem
文件。
如果您已经验证有正当理由在您和互联网之间建立代理,您没有接触生产,并且证书很难获得,您可以通过insecure = true
在您的提供商上设置来测试您的代码。显然,不要检查。
推荐阅读
- java - GWT - 在本机方法中直接使用 java bean 参数
- android-studio - 在 Android Studio 中将 gradle 文件显示为其模块的一部分
- terraform - 我可以在 Terraform Cloud 上使用 Terragrunt
- datepicker - Materializecss date picker is not working
- git - Looking for folders containing bare git repositories
- mysql - Typo3 LTS9 学说:如何使用 mysql @-Variables?
- elasticsearch - bool 查询不支持 [search_after] -- 弹性搜索错误
- authentication - npm login --always-auth doesn't add the appropriate entry to the config
- python - How do I read a CSV file using Pandas then split the columns into two Numpy arrays using to_numpy for Scikit-Learn?
- azerothcore - 在游戏连接中禁用并允许创建角色 azerothcore