Unni P
Posted on May 5, 2023
In this article, we will look how we can install Terraform on Ubuntu using Homebrew and in Windows using Scoop
Ubuntu
Install some prerequisite packages
sudo apt update
sudo apt install build-essential procps curl file git
Install Homebrew using the provided convenience script
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Add Homebrew in our system PATH using the below commands
(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/ubuntu/.profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
Verify the version and install the recommended gcc package
brew --version
brew install gcc
Turn off Homebrew anonymous aggregate user behavior analytics
brew analytics off
Add the HashiCorp repository and install Terraform
brew tap hashicorp/tap
brew install hashicorp/tap/terraform
Verify the version
terraform -version
Windows
Open a Powershell terminal (version 5.1 or above) and execute the below commands to install Scoop
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
irm get.scoop.sh | iex
Install Terraform and verify its version
scoop install terraform
terraform -version
Reference
💖 💪 🙅 🚩
Unni P
Posted on May 5, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.