我正在尝试将RKE提供者作为牧场主AWS快速启动的一部分来安装。Terraform文档说插件应该安装在~/.terraform.d/plugins上。RKE文档指出插件应该安装在~/terraform.d/plugins/<your_platform>上。
为了调和冲突的信息,我尝试将二进制文件复制到以下所有位置,但Terraform从未看到任何位置:
~/.terraform.d/plugins/terraform-provider-rke
~/.terraform.d/plugins/rke
~/.terraform.d/plugins/darwin_amd64/terraform-provider-rke
~/.terraform.d/plugins/darwin_amd64/rke
~/terraform.d/plugins/terraform-provider-rke
~/terraform.d/plugins/rke
~/terraform.d/plugins/darwin_amd64/terraform-provider-rke
~/terraform.d/plugins/darwin_amd64/rke在每种情况下,当我运行terraform init时,都会得到以下错误:
Provider "rke" not available for installation.
A provider named "rke" could not be found in the Terraform Registry.
This may result from mistyping the provider name, or the given provider may
be a third-party provider that cannot be installed automatically.
In the latter case, the plugin must be installed manually by locating and
downloading a suitable distribution package and placing the plugin's executable
file in the following directory:
terraform.d/plugins/darwin_amd64
Terraform detects necessary plugins by inspecting the configuration and state.
To view the provider versions requested by each module, run
"terraform providers".
Error: no provider exists with the given name作为最后的手段,我可以使用terraform init -plugin-dir=<something>。但是Terraform没有看到任何自动下载的插件,我必须手动安装所有插件。
是否有丢失的路径变量,或者我没有遵循的其他命名约定?
发布于 2020-05-05 00:35:28
事实证明,错误信息并没有告诉整个故事。Terraform正在寻找供应商,但它认为这还不够新版本。
根据Terraform文档,提供者需要被命名为terraform-provider-<NAME>_vX.Y.Z。RKE提供程序的文档说文件应该叫做terraform-provider-rke (没有版本号)。
在插件发现的Terraform源代码中的注释中,它表示支持这种无版本格式,以实现反向兼容性。然而,Terraform将版本解释为v0.0.0。
当我在失败的terraform plan之后运行terraform init时,它给了我一个信息更丰富的错误消息:
Error: provider.rke: no suitable version installed
version requirements: "0.14.1"
versions installed: "0.0.0"该版本可能是依赖于RKE提供程序的另一个提供程序的要求。
我返回并手动下载了这个版本,并将其复制到名为terraform-provider-rke_v0.14.1的插件目录中。啊,真灵!
那你就去吧。当有疑问时,请看源代码。现在向Rancher提交一份问题报告,告诉他们更新他们的文件。:-)
发布于 2021-04-20 11:37:27
企业防火墙上的Windows ,其中不允许直接下载提供程序压缩文件。
terraform init plugin。
目录结构:
aws_v3.37.0_x5.exe

https://stackoverflow.com/questions/61600637
复制相似问题