Install Terraform on Mac with Homebrew (brew install terraform 2026)
Step-by-step guide to install Terraform on macOS with Homebrew. Covers brew tap hashicorp/tap, version pinning, upgrading, multiple versions with tfenv, and troubleshooting common install errors.
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