Terraform will damage your computer?

No. It will not.

Karif Battle
1 min readMay 4, 2023
Mac dialog box warning users that “terraform” will damage your computer. You should move it to the Trash. DO NOT DO IT. Read article for fix.

Got this error one day after opening VS Code.

Clicked cancel and closed VS Code.

Checked terraform with the command below and boom — same issue.

~ % terraform --version
zsh: killed terraform - version

Turns out HashiCorp changed the gpg key on April 24th 2023 in response to
a CircleCI security alert.

Here’s the fix for tfenv Mac M1 users like me:

  1. Get the terraform version you are currently running:
~ % tfenv list
* 1.2.9 (set by /opt/homebrew/Cellar/tfenv/2.2.3/version)

2. Uninstall terraform:

~ % tfenv uninstall 1.2.9
Uninstall Terraform v1.2.9
Terraform v1.2.9 is successfully uninstalled

3. Reinstall your current terraform version OR the latest version like I did:

~ % tfenv install latest
Installing Terraform v1.4.6
Downloading release tarball from https://releases.hashicorp.com/terraform/1.4.6/terraform_1.4.6_darwin_arm64.zip
##################################################################################################################################################### 100.0%
Downloading SHA hash file from https://releases.hashicorp.com/terraform/1.4.6/terraform_1.4.6_SHA256SUMS
No keybase install found, skipping OpenPGP signature verification
Archive: /var/folders/wj/n3zkkk6j4sq590nqnjctj3hw0000gn/T/tfenv_download.XXXXXX.9OQNwAyt/terraform_1.4.6_darwin_arm64.zip
inflating: /opt/homebrew/Cellar/tfenv/2.2.3/versions/1.4.6/terraform
Installation of terraform v1.4.6 successful. To make this your default version, run 'tfenv use 1.4.6'

4. Make the latest version your default:

~ % tfenv use 1.4.6
Switching default version to v1.4.6
Switching completed

5. Problem solved:

~ % terraform --version
Terraform v1.4.6
on darwin_arm64

--

--

Karif Battle

From the dark and light side of my moon, I bring you tales of the ineffable. And some mo stuff.