This post will show you how to install Terraform on Ubuntu 18.04

Terraform is an open-source infrastructure as code software tool created by HashiCorp. It enables users to define and provision a datacenter infrastructure using a high-level configuration language known as Hashicorp Configuration Language (HCL), or optionally JSON. Terraform supports a number of cloud infrastructure providers such as AWS, GCP and Azure.

Steps

First you will need to go to the downloads page on the Terraform website.

https://www.terraform.io/downloads.html

Look for the Linux section, right click on the 64-bit option and select Copy link location

How to install Terraform on Ubuntu 18.04_1

Next go to your Ubuntu terminal and input

wget and paste the url you just copied

How to install Terraform on Ubuntu 18.04

You now should have a zipped version of the Terraform package in you Downloads directory.

How to install Terraform on Ubuntu 18.04_3

Unzip the package

unzip terraform_0.12.24_linux_amd64.zip

How to install Terraform on Ubuntu 18.04_4

Next move the binary to /usr/local/bin

How to install Terraform on Ubuntu 18.04_5

To confirm a Terraform has being installed successfully, type terraform --version in your terminal and you should see something like the following.

How to install Terraform on Ubuntu 18.04_6

That's it, Terraform should now be installed on your Ubuntu system and ready for use.

Leave a comment below if this worked for you or not.

Leave a Comment