安装"aws"提供程序时出错:openpgp:由未知实体制作的签名。

33

我正在使用terraform版本0.11.13,今天下午在terraform init步骤中遇到了以下错误信息。 这是不是意味着我需要升级terraform版本?针对aws提供程序是否有弃用的版本?

完整日志如下:

Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.

[1mInitializing provider plugins...
- Checking for available provider plugins on https://releases.hashicorp.com...

Error installing provider "aws": openpgp: signature made by unknown entity.

Terraform analyses the configuration and state and automatically downloads
plugins for the providers used. However, when attempting to download this
plugin an unexpected error occured.

This may be caused if for some reason Terraform is unable to reach the
plugin repository. The repository may be unreachable if access is blocked
by a firewall.

If automatic installation is not possible or desirable in your environment,
you may alternatively manually install plugins by downloading a suitable
distribution package and placing the plugin's executable file in the
following directory:
    terraform.d/plugins/linux_amd64

2
刚刚开始遇到了这个问题。将AWS提供程序版本设置为“〜> 2.70.0”似乎暂时解决了这个问题。 - Duarte Mendes
5个回答

54

2
适用于tf 0.11.10。谢谢。 - Marcin
1
这对我很有帮助。谢谢@Andrei Sfat - Santosh Garole

15

2
针对MacOS用户:brew upgrade terraform@0.11 - kivagant

12

重要提示:虽然这个答案可以解决立即的问题,但是它会通过禁用安全检查来创建潜在的安全风险。请谨慎使用

你也可以执行以下命令:

terraform init -verify-plugins=false

这对我有用。


11

用于发布签名和验证的GPG密钥已经更换。新版本的Terraform使用此更新的密钥来验证官方提供程序,并且官方提供程序的发布将使用此密钥进行签名。

了解更多


谁负责旋转 GPG 密钥?这个变更是在 Terraform 方面发生的还是在客户端应用程序方面发生的? - femeloper
2
这是 Terraform 方面的问题 @femeloper,由于安全问题引起:https://discuss.hashicorp.com/t/hcsec-2021-12-codecov-security-event-and-hashicorp-gpg-key-exposure/23512 - tristanvvatson

0
修复提供程序版本解决了问题。

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