Terraform Installation

References:

A basic Terraform install is pretty straight-forward:

Linux – RHEL8:

sudo yum install -y yum-utils

sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo

sudo yum -y install terraform

terraform -help

touch ~/.bashrc

terraform -install-autocomplete

# Note need to restart shell

Windows – PowerShell

Get-ExecutionPolicy     # Must show unrestricted, otherwise use Set-ExecutionPolicy

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

choco

choco install terraform

terraform -help

MacOS – Homebrew

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

brew upgrade

brew install terraform

terraform -help

touch ~/.bashrc

terraform -install-autocomplete