【发布时间】:2021-12-30 11:32:46
【问题描述】:
我在我的 Mac M1 上使用 Terraform v1.0.11。当我尝试运行terraform init 时,遇到以下错误:
Initializing provider plugins...
- Finding latest version of hashicorp/local...
- Finding latest version of hashicorp/null...
- Reusing previous version of hashicorp/aws from the dependency lock file
- Finding latest version of hashicorp/random...
- Finding latest version of hashicorp/template...
- Finding latest version of hashicorp/external...
- Installing hashicorp/external v2.1.0...
- Installed hashicorp/external v2.1.0 (signed by HashiCorp)
- Installing hashicorp/local v2.1.0...
- Installed hashicorp/local v2.1.0 (signed by HashiCorp)
- Installing hashicorp/null v3.1.0...
- Installed hashicorp/null v3.1.0 (signed by HashiCorp)
- Using previously-installed hashicorp/aws v3.53.0
- Installing hashicorp/random v3.1.0...
- Installed hashicorp/random v3.1.0 (signed by HashiCorp)
╷
│ Error: Incompatible provider version
│
│ Provider registry.terraform.io/hashicorp/template v2.2.0 does not have a package available for your current platform, darwin_arm64.
│
│ Provider releases are separate from Terraform CLI releases, so not all providers are available for all platforms. Other versions of this provider
│ may have different platforms supported.
我的供应商供应商信息:
terraform {
required_providers {
aws = {
version = "~> 3.53.0"
}
}
}
我了解提供程序版本不适用于 M1。有什么解决方法吗?
我尝试使用这个:https://github.com/hashicorp/terraform/issues/27257#issuecomment-754777716,但提供程序版本为 3.53.0,但遇到了问题。
这个问题有解决办法吗?
【问题讨论】:
-
试用 3.63.0 对我有用
-
根据错误信息,是
template提供程序不兼容。此外,无论如何,该提供程序已被弃用,因此您可以在配置中升级它的使用。 -
@MattSchuchard 我对 Terraform 很陌生。你能解释一下
template是什么吗?我还尝试像@BrianMcCall 所说的那样将提供程序版本更改为 3.63.0。但它不起作用。 -
您需要从配置中删除
template提供程序。 -
@MattSchuchard 即使我删除了
template部分,我也会遇到同样的错误。它显示Provider registry.terraform.io/hashicorp/aws v3.66.0 does not have a package available for your current platform, darwin_amd64.
标签: amazon-web-services terraform terraform-provider-aws