【问题标题】:Terraform Intermittent error on Apple's M1Apple M1 上的 Terraform 间歇性错误
【发布时间】:2022-07-19 01:57:10
【问题描述】:

当我运行terraform plan 时,我希望看到一个计划,但我得到了

│ Error: Failed to load plugin schemas
│
│ Error while loading schemas for plugin components: Failed to obtain provider schema: Could not load the schema for provider registry.terraform.io/hashicorp/aws: failed to
│ instantiate provider "registry.terraform.io/hashicorp/aws" to obtain schema: Unrecognized remote plugin message:
│
│ This usually means that the plugin is either invalid or simply
│ needs to be recompiled to support the latest protocol...

系统是:arm64 m1 - Monterey - TFEnv - Terraform 1.1.9

【问题讨论】:

    标签: terraform terraform-provider-aws apple-m1


    【解决方案1】:

    解决方案

    说明

    1. 通过 Apple 的 Rosetta 运行 amd64 M1 的 Go 运行时出现问题
    2. TFenv 安装了 amd64 版本的 Terraform 而不是 arm64。

    补丁

    通过将变量 GODEBUG=asyncpreemptoff=1 添加到 terraform 的前面或将其添加到 bash 配置文件中来设置它。

    修复

    确保您正在为您的系统运行正确的构建。

    ➜ terraform version
    Terraform v1.1.9
    on darwin_arm64
    

    如果您在 M1 上并在运行 terraform version 时看到 darwin_amd64,请尝试再次安装 Terraform。

    详情

    1. https://github.com/hashicorp/terraform-provider-aws/issues/23850
    2. https://yaleman.org/post/2021/2021-01-01-apple-m1-terraform-and-golang/

    【讨论】:

      猜你喜欢
      • 2016-05-20
      • 1970-01-01
      • 2023-03-07
      • 2022-02-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-13
      相关资源
      最近更新 更多