warrensbox/terraform-switcher

New macOS security feature prevents terraform to run (installed via tfswitch)

Closed this issue · 2 comments

ambis commented

macOS version: 13.3.1 (22E261)
Mac: MBP M1
tfswitch verision: 0.13.1308 (via brew)
commands:

$ tfswitch
# select version, test folder, and .tfswitch.toml says binary path is: ./
$ ./terraform init

and then this:

MicrosoftTeams-image

Is there anything tfswitch has to do with MacOS security? 🤔
I'm not a MacOS guy so I might miss context, though looking at the screenshot it seems to me that you shouldn't be installing Terraform with tfswitch into an arbitrary locations, but rather into "the Bin". For that you may need to adjust your .tfswitch.toml file. Please see the example at https://github.com/warrensbox/terraform-switcher#use-tfswitchtoml-file--for-non-admin---users-with-limited-privilege-on-their-computers

ps: if you do indeed need terraform binary to be installed at an arbitrary location, you'd probably need to exclude it from MacOS quarantine then: xattr -d com.apple.quarantine /path/to/arbitrary/location/with/terraform/binary (do it on your own risk).

ambis commented

Just to clairfy, "Move to Bin" in this context means "Move to Trash", not to "binaries folder".