How to install Terraform on M1/M2 Mac

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.

  1. Open Terminal App.
  2. Now run the command,
    brew install terraform

    ==> Downloading
    ######## 100.0%
    ==> Fetching terraform
    ==> Downloading
    ######## 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`).

  3. 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.

Installing Terraform on M1 M2 Mac Steps

This is not an AI-generated article but is demonstrated by a human on an M1 Mac running macOS Sonoma 14.0.

Please support independent contributors like Code2care by donating a coffee.

Buy me a coffee!

Buy Code2care a Coffee!

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail:

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap