26

我正在使用 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
4

5 回答 5

42

HashiCorp 已将其发布签名密钥作为HCSEC-2021-12的一部分进行轮换

例如,对于 terraform 0.11.x,您可以将aws版本设置为v2.70.0

provider "aws" {
  region  = "us-east-1"
  version = "v2.70.0"
}

对于其他版本,您可以查看:https ://registry.terraform.io/providers/hashicorp/aws/latest/docs

于 2021-05-05T13:03:37.907 回答
10

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

更多关于

于 2021-05-03T13:50:19.030 回答
9

Hashicorp 已使用新的 GPG 密钥重新签名,作为内部安全票证的一部分

要解决这个问题,请考虑转移到新版本的 Terraform - 这已在0.11.15中修复,您应该升级到此版本。这不应该影响其他任何事情,因为只有微小的变化。

于 2021-05-07T09:48:18.183 回答
5

重要- 虽然此答案可以解决眼前的问题,但通过禁用安全检查会产生潜在的安全风险。谨慎使用

你也可以

terraform init -verify-plugins=false

这对我有用。

于 2021-05-05T14:04:30.100 回答
0

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

于 2021-05-03T14:11:39.513 回答