Installing Terraform
Install the Terraform CLI on macOS with Homebrew or MacPorts, on Windows with Chocolatey or Scoop, and on Linux with APT or DNF.
Before using the Streamkap Terraform Provider, you need to install the Terraform CLI on your machine.
macOS
Homebrew (Recommended)
Homebrew is the most popular package manager for macOS.
# Add the HashiCorp tap
brew tap hashicorp/tap
# Install Terraform
brew install hashicorp/tap/terraform
# Verify installation
terraform --version
MacPorts
If you use MacPorts, Terraform is available in the ports collection:
sudo port install terraform
# Verify installation
terraform --version
Windows
Chocolatey (Recommended)
Chocolatey is a popular package manager for Windows.
# Run in an elevated PowerShell prompt (Run as Administrator)
choco install terraform
# Verify installation
terraform --version
Scoop
Scoop is another package manager for Windows:
scoop install terraform
# Verify installation
terraform --version
Manual Installation
- Download the appropriate package from the Terraform downloads page
- Extract the zip archive
- Move
terraform.exeto a directory in your system PATH (e.g.,C:\Windows\System32or create a dedicated directory) - Open a new command prompt and verify:
terraform --version
Linux
Ubuntu/Debian (APT)
# Add HashiCorp GPG key
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
# Add the official HashiCorp repository
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
# Update and install
sudo apt update && sudo apt install terraform
# Verify installation
terraform --version
RHEL/CentOS/Fedora (DNF/YUM)
# Add HashiCorp repository
sudo dnf config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
# Install Terraform
sudo dnf install terraform
# Verify installation
terraform --version
Troubleshooting
Command not found after installation
Ensure the Terraform binary is in your system PATH. You may need to restart your terminal or shell session after installation.
Permission denied errors on macOS/Linux
If you encounter permission errors, ensure you’re using sudo where required, or check that your user has write access to the installation directory.
Version mismatch or old version
If you have an older version installed via a different method, uninstall it first before using a package manager. For Homebrew: brew unlink terraform before installing the HashiCorp tap version.