用于 Mac M1 安装的 Terraform aws 提供程序问题 [英] Terraform aws provider issue for Mac M1 Installation

查看:37
本文介绍了用于 Mac M1 安装的 Terraform aws 提供程序问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的 Mac M1 上使用 Terraform v1.0.11.当我尝试运行 terraform init 时,遇到以下错误:

I use Terraform v1.0.11 on my Mac M1. When I try to run terraform init, I run into the following error:

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.

我的供应商供应商信息:

My provider provider info:

terraform {
  required_providers {
    aws = {
      version = "~> 3.53.0"
    }
  }
}

我了解提供程序版本不适用于 M1.有什么解决方法吗?

I understand that the provider version is not available for M1. Is there any workaround for this?

我尝试使用这个:https://github.com/hashicorp/terraform/issues/27257#issuecomment-754777716,但提供程序版本为 3.53.0,但遇到了问题.

I tried using this: https://github.com/hashicorp/terraform/issues/27257#issuecomment-754777716, but with provider version 3.53.0, but running into issues.

这个问题有解决办法吗?

Is there any workaround for this problem?

推荐答案

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

You can use what they say on this answer to run on your M1 which is to compile the resource for your architecture.

但是模板是一个已弃用的资源您可以使用 templatefile 正常工作在 M1 上.

However template is a deprecated resource and you can use templatefile which works correctly on M1.

这篇关于用于 Mac M1 安装的 Terraform aws 提供程序问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆