37

I have problem with terraform on my macOS Ventura 13.3.1. When I try to initialize terragrunt:

terragrunt init

I have information that

Terraform will damage your computer

My colleague is using M1 and terraform version 1.0.11 and he don't have problem. I tried latest version and also 1.0.11, but I still have this error. I installed terraform via tfenv.

enter image description here

falauthy
  • 521
  • 1
  • 5
  • 15

5 Answers5

26

As per the announcement from 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.

To fix the issue:

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.

Marko E
  • 13,362
  • 2
  • 19
  • 28
  • yep, this could be answer. Downloaded gpg key from hashicorp and after unsintall terraform via tfenv and install again its worked. – falauthy Apr 28 '23 at 12:46
26

Looks like the rotated signing key was the issue for me too (and probably every mac user of terraform)

Reinstall with brew solved this for me. I keep previous versions in case I need them so I have a symlink to the current version. Remove that first

which terraform
#remove my symlink so brew can replace it
#rm '/usr/local/bin/terraform'

then update with brew (as recommended by hashicorp)

brew tap hashicorp/tap
brew install hashicorp/tap/terraform
jorfus
  • 2,804
  • 27
  • 23
  • 3
    This worked for me, but since I use **tfenv** to switch between different terraform versions I also needed to run: `brew link --overwrite --dry-run terraform` – famen May 04 '23 at 16:40
12

brew reinstall terraform worked for me.

6
brew reinstall tfenv
tfenv use terraform 1.3.9
123
  • 8,733
  • 14
  • 57
  • 99
Sauceman
  • 147
  • 6
  • 1
    I recommend that you don't post only code as answer, but also provide an explanation what your code does and how it solves the problem of the question. Answers with an explanation are usually more helpful and of better quality, and are more likely to attract upvotes. – Mark Rotteveel May 10 '23 at 09:26
0

These steps worked for me

rm '/usr/local/bin/terraform'

brew reinstall terraform
Velu
  • 1,681
  • 1
  • 22
  • 26