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



我使用的是terraform版本0.11.13,今天下午我在terraform init步骤中收到以下错误这是否意味着我必须升级地形版本,对于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

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

例如,对于地形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

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

为了解决这个问题,希望转换到Terraform的新版本-这在0.11.15中得到了修复,您应该升级到这个版本。这不应该影响其他任何事情,因为只有微小的变化。

重要-虽然这个答案可以解决眼前的问题,但它会通过禁用安全检查来产生潜在的安全风险小心使用

您也可以进行

terraform init -verify-plugins=false

这对我有效。

用于发布签名和验证的GPG密钥已旋转。Terraform的新版本使用此更新的密钥来验证官方提供商,官方提供商版本将使用此密钥进行签名。

有关的更多信息

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

最新更新