【问题标题】:Terraform aws provider issue for Mac M1 Installation用于 Mac M1 安装的 Terraform aws 提供程序问题
【发布时间】: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


【解决方案1】:

您可以使用他们在this answer 上所说的内容在您的 M1 上运行,即为您的架构编译资源。

但是模板deprecated resource,您可以使用templatefile,它在M1上正常工作。

【讨论】:

    猜你喜欢
    • 2022-06-16
    • 1970-01-01
    • 2022-07-04
    • 2021-07-29
    • 2021-07-13
    • 2021-08-06
    • 2021-09-24
    • 2021-07-24
    • 2021-10-24
    相关资源
    最近更新 更多