Installing Terraform

Clarence Subia
Jul 18, 2023
  1. Clone from repository
git clone https://github.com/hashicorp/terraform.git

2. Go to the terraform directory

cd terraform
go install

3. Add terraform to $PATH

echo $PATH
mv ~/Downloads/terraform /usr/local/bin/

4. Verify installation

terraform --help

5. Enable tab completion (Optional)

touch ~/.bashrc

# Add to the ~/.bashrc file
terraform -install-autocomplete

--

--