🧰 Terraform CLI Installation Guide (macOS)¶
📋 Overview¶
This guide describes how to install the Terraform CLI on a macOS system using Homebrew. Terraform is an Infrastructure as Code (IaC) tool that lets you define, provision, and manage cloud infrastructure declaratively.
⚙️ Prerequisites¶
- macOS (Intel or Apple Silicon)
- Homebrew package manager installed
- Internet connectivity for downloading the Terraform binary
To verify that Homebrew is installed, run:
If Homebrew is missing, install it with:
🚀 Installation Steps¶
1. Update Homebrew¶
Refresh your local Homebrew repository to ensure you have the latest package definitions:
2. Install Terraform¶
Run the following command to install Terraform via Homebrew:
This will:
- Download the latest stable version of Terraform
- Place the binary in your Homebrew-managed PATH (usually
/usr/local/binor/opt/homebrew/bin)
3. Verify the Installation¶
Check that Terraform is correctly installed:
Example output:
If you see a version number and platform (e.g., darwin_arm64 or darwin_amd64), Terraform is successfully installed.
🧩 Post-Installation (Optional)¶
To update Terraform later:
To uninstall Terraform: