Install Terraform


Terraform Official Documentation

Install Terraform | Terraform - HashiCorp Learn



Ensure that your system is up to date, and you have the GnuPG, software-properties-common, and curl packages installed. You will use these packages to verify HashiCorp’s GPG signature and install HashiCorp’s Debian package repository.

sudo apt-get update && sudo apt-get install -y gnupg software-properties-common curl

Add the HashiCorp GPG key.

curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add 

Add the official HashiCorp Linux repository.

sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"

Update to add the repository, and install the Terraform CLI.

sudo apt-get update && sudo apt-get install terraform


Install Homebrew

/bin/bash -c "$(curl -fsSL [https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh](https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh))"

First, install the HashiCorp tap, a repository of all our Homebrew packages.

brew tap hashicorp/tap

Now, install Terraform with hashicorp/tap/terraform.

brew install hashicorp/tap/terraform


Chocolatey is a free and open-source package management system for Windows. Install the Terraform package from the command line.

choco install terraform