Terraform will damage your computer在macOS英特尔上的电脑
我在macOS Ventura 13.3.1上遇到了terraform的问题。当我试图初始化terragrunt时:
terragrunt init
我得到这样的信息
Terraform will damage your computer
我的同事正在使用M1和1.0.11版的terraform,他没有问题。我尝试了最新的版本和1.0.11,但我仍然有这个错误。我通过tfenv安装了terraform。
根据HashiCorp的公告:
The certificate used to sign Apple artifacts was rotated on January 23rd, with existing artifacts re-signed with the new certificate. The previous signing key was revoked on April 24th, 2023.
为了解决这个问题:
After certificate revocation, users are expected to encounter errors using Apple artifacts that were downloaded before January 23rd. Users will need to re-download Apple artifacts from the Releases Site, which have been signed using the new certificate.
看起来轮换的签名密钥对我来说也是个问题(可能也是每一个使用terraform的mac用户的问题)。
用brew重新安装为我解决了这个问题。 我保留了以前的版本,以备不时之需,所以我有一个与当前版本的符号链接。 先删除这个链接
which terraform
#remove my symlink so brew can replace it
#rm '/usr/local/bin/terraform'
然后用brew进行更新(根据hashicorp的建议)。
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
brew link --overwrite --dry-run terraform
- famen 2023-05-04
brew reinstall terraform
对我来说是有效的。
brew reinstall tfenv
brew use terraform 1.3.9