错误:terraform init、plan、apply

3
当我执行 terraform init、plan 或 apply 时,遇到以下错误:
Failed to load backend: 
Error configuring the backend "s3": RequestError: send request failed
caused by: Post https://sts.amazonaws.com/: dial tcp: lookup sts.amazonaws.com on 127.0.1.1:53: server misbehaving

Please update the configuration in your Terraform files to fix this error.
If you'd like to update the configuration interactively without storing
the values in your configuration, run "terraform init".

有什么线索吗?

看起来无法解析服务。 dig sts.amazonaws.com 的输出是什么?那个 DNS 服务器看起来像是本地的 DNSMasq,你在那里做了什么特殊的事情还是只是一个标准的缓存服务器? - ydaetskcoR
出现了类似的问题“Error configuring the backend "s3": RequestError: send request failed”,后来发现是我的Mac上的ssl(libressl)出了问题,重启解决了这个问题。 - OfirYaron
这为我提供了一个解决方法:https://github.com/hashicorp/terraform-provider-aws/issues/5419#issuecomment-522051353 - Rupesh
2个回答

2

如果您使用的是MacOS系统,并且安装了LittleSnitch,那么由于terraform签名无效,它会被LittleSnitch拦截。只需前往LittleSnitch中删除相应规则或修改规则即可。


哎呀,我在这里浪费了太多时间,哈哈!我使用Objective-See的LuLu和BlockBlock,它们与LittleSnitch类似地进行流量过滤和阻止。它们通常会提示允许未分类的网络访问,但在AWS查找时不会。谢谢! - cayleyh

0
这种情况发生在您的计算机和s3之间存在连接问题时。这可能是由于那段时间互联网不稳定造成的。
一旦您能够连接到s3,它应该会自动修复。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接