【发布时间】:2021-06-16 01:24:29
【问题描述】:
昨天,Terraform 在我的 Mac OS X 笔记本电脑上运行良好。今天我开始使用它,我遇到了一个我以前从未见过的错误。我正在使用谷歌云提供商。
我运行 terraform init 并没问题,但是当我运行 terraform apply 时,我收到一条错误消息,上面写着 Failed to instantiate provider:
terraform apply
Error: Could not load plugin
Plugin reinitialization required. Please run "terraform init".
Plugins are external binaries that Terraform uses to access and manipulate
resources. The configuration provided requires plugins which can't be located,
don't satisfy the version constraints, or are otherwise incompatible.
Terraform automatically discovers provider requirements from your
configuration, including providers used in child modules. To see the
requirements and constraints, run "terraform providers".
2 problems:
- Failed to instantiate provider "registry.terraform.io/hashicorp/google" to
obtain schema: fork/exec
.terraform/providers/registry.terraform.io/hashicorp/google/3.60.0/darwin_amd64/terraform-provider-google_v3.60.0_x5:
input/output error
- Failed to instantiate provider "registry.terraform.io/hashicorp/random" to
obtain schema: fork/exec
.terraform/providers/registry.terraform.io/hashicorp/random/3.1.0/darwin_amd64/terraform-provider-random_v3.1.0_x5:
input/output error
它告诉我运行terraform init 但是我已经这样做了。我一直在谷歌搜索,但没有运气。有谁知道如何解决这个错误?
【问题讨论】:
-
您能否为 ypur 提供商发布内容?使用 terraform 版本?我可以尝试复制它并提供帮助。
-
嗨,我在 terraform 0.14.8 上,我的提供者是 google:3.60.0,随机提供者是 3.1.0。如何为提供商提供内容?
-
您是否尝试过删除 .terraform 文件夹及其所有内容,然后再次运行“干净”
terraform init? -
@TimDunphy 您可以编辑您的原始帖子并添加提供者 sn-ps。
-
是的,我已尝试删除
.terraform文件夹并再次运行terraform init。那没有效果。
标签: terraform terraform-provider-gcp