Terraform is the most popular Infrastructure as Code (IaC) tool used to build scripts to deploy applications to Cloud Services such as Azure, AWS, or Google Cloud Services.
If you are working on a ARM based M1/M2 Mac/Macbook, and want to install Terraform then you should make use of Homebrew package manager.
Open Terminal App.
Now run the command,
brew install terraform
Logs:
==> Downloading https://ghcr.io/v2/homebrew/core/terraform/manifests/1.5.7
######## 100.0%
==> Fetching terraform
==> Downloading https://ghcr.io/v2/homebrew/core/terraform/blobs/sha256:f43afa7c6970e1b
######## 100.0%
==> Pouring terraform--1.5.7.arm64_sonoma.bottle.tar.gz
🍺 /opt/homebrew/Cellar/terraform/1.5.7: 6 files, 69.7MB
==> Running `brew cleanup terraform`...
Disable this behavior by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Now let's validate if terraform was installed correctly by running the --version command.
% terraform --version
Terraform v1.5.7
on darwin_arm64
As you can see we have the ARM-64 Native version installed on M1/M2 Mac.
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!