lob*_*obi 0 terraform apple-m1
由于使用 M1 mac,我收到一个错误,导致 terraform 初始化无法成功(见下文);这是由于 terraform 在不需要时尝试安装 hasicorp/template 提供程序引起的。为什么当没有任何资源需要时,hashicorp/模板提供程序会尝试安装?
\n\n\n\xe2\x94\x82 错误:不兼容的提供程序版本 \xe2\x94\x82 \xe2\x94\x82 提供程序\nregistry.terraform.io/hashicorp/template v2.2.0 没有\n适用于您当前平台 darwin_arm64 的软件包。
\n
此处记录:https://discuss.hashicorp.com/t/template-v2-2-0-does-not-have-a-package-available-mac-m1/35099
\n具体来说,即使我没有使用 template_file 或来自该提供程序的任何其他实体,terraform 仍然尝试安装 hashcorp/template 提供程序;我尝试删除 .terraform 和我的锁定文件,但仍然遇到此问题:
\nInitializing provider plugins...\n- terraform.io/builtin/terraform is built in to Terraform\n- Finding latest version of hashicorp/template...\n- Finding hashicorp/aws versions matching "~> 3.0"...\n- Finding latest version of hashicorp/random...\nRun Code Online (Sandbox Code Playgroud)\n
问题是状态文件仍然引用 template_file 对象。我通过 删除了它terraform state rm <object>,现在可以成功进行 terraform 初始化。
| 归档时间: |
|
| 查看次数: |
1198 次 |
| 最近记录: |