为什么 terraformer 找不到插件?

sch*_*oon 2 windows chocolatey terraform terraform-provider-gcp

我是地形世界的新手。我正在尝试在 GCP 项目上使用 terraformer,但始终找不到插件:

terraformer import google --resources=gcs,forwardingRules,httpHealthChecks --connect=true --
regions=europe-west1,europe-west4 --projects=myproj
2021/02/12 08:17:03 google importing project myproj region europe-west1
2021/02/12 08:17:04 google importing... gcs
2021/02/12 08:17:05 open \.terraform.d/plugins/windows_amd64: The system cannot find the path specified.
Run Code Online (Sandbox Code Playgroud)

在上述之前,安装了 terraformer:choco install terraformer我下载了 Google 提供程序 ,terraform-provider-google_v3.56.0_x5.exe将其放在我的 terraform 目录中,然后执行了terraform init。我检查了%AppData\Roaming\terraform.d\plugins\windows_amd64一下,发现它plugins\windows_amd64不存在,所以我创建了它,放入 Google exe 中并重新启动了 init。

我的 main.tf 是:

provider "google" {
 project = "{myproj"
  region  = "europe-west2"
  zone    = "europe-west2-a"
}
Run Code Online (Sandbox Code Playgroud)

难道是巧克力安装导致了这个问题?我以前从未使用过它,但替代安装看起来令人生畏!

Pau*_*ane 7

如果您从 Chocolatey 安装,它似乎会在 处查找提供程序文件C:\.terraform.d\plugins\windows_amd64。如果您创建这些目录并将terraform-provider-xxx.exe文件放入其中,它将被拾取。

我还建议使用该--verbose标志运行它。