Install Terraform on Mac with Homebrew (brew install terraform 2026)
Install Terraform on macOS with Homebrew: pin specific versions, upgrade safely, manage multiple versions with tfenv, and troubleshoot common errors. Complete guide to brew install terraform with version control.
brew tap hashicorp/tapbrew install hashicorp/tap/terraformterraform --version
That's it — three commands and you're running Terraform 1.12+ on macOS. Read on for version pinning, multiple-version management, and troubleshooting.
Homebrew is the standard way to install Terraform on macOS. It handles installation, upgrades, and dependency management automatically. The hashicorp/tap is the official source maintained by HashiCorp, ensuring you always get the latest stable Terraform release.
Why not just brew install terraform? Since HashiCorp moved Terraform to the Business Source License, Homebrew no longer ships it from homebrew-core — you need HashiCorp's own tap, so brew tap hashicorp/tap followed by brew install hashicorp/tap/terraform is the correct command.
HashiCorp maintains an official Homebrew tap with all their tools (Terraform, Vault, Packer, Consul, etc.):
brew tap hashicorp/tap
Expected output:
==> Tapping hashicorp/tapCloning into '/opt/homebrew/Library/Taps/hashicorp/homebrew-tap'...Tapped 2 casks and 28 formulae (87 files, 1015.4KB).
Why use the official tap? The hashicorp/tap/terraform formula is maintained by HashiCorp and always has the latest release. The default terraform formula in homebrew-core may lag behind.
Run brew tap hashicorp/tap then brew install hashicorp/tap/terraform. Confirm it worked with terraform --version. Homebrew installs the latest stable Terraform and keeps it updated through brew upgrade.
Run brew upgrade hashicorp/tap/terraform. To check your current version first, run terraform --version. HashiCorp releases updates frequently, so upgrading periodically is recommended.
Yes. Homebrew installs the native darwin_arm64 build automatically on Apple Silicon Macs, and the same brew install hashicorp/tap/terraform command works on both Intel and Apple Silicon.
How do I install a specific Terraform version on macOS?
Use tfenv: brew install tfenv, then tfenv install 1.12.0 and tfenv use 1.12.0. tfenv lets you switch between versions per project with a .terraform-version file.
Installing Terraform on macOS with Homebrew takes under a minute. For team environments, use tfenv to manage multiple versions and add a .terraform-version file to each project. Keep your installation updated with brew upgrade hashicorp/tap/terraform — HashiCorp releases new versions frequently with bug fixes and new provider features.
#HashiCorp#Infrastructure as Code#macOS#Terraform installation#Homebrew