How to Install Terraform on Ubuntu 20.04


 

Terraform is a infrastructure as a code platform created by HashiCorp. You can essentially compose code in the intelligible arrangement following HashiCorp Configuration Language (HCL) and send it to get the foundation in the cloud. Terraform is upheld in many cloud suppliers like Google, Amazon, Alibaba, and so on

Here in this article, we will introduce the most recent adaptation of terraform on Ubuntu. We are performing terraform establishment on Ubuntu 20.04 anyway you can do similar method on all Linux stages.
 

In this post, We will install Terrafrom on ubuntu 20.04 LTS. 

 

Step 1: Update and Upgrade the System

 

You need to update and upgrade the current ubuntu repository and current install packages by using the given command.

$ sudo apt-get update && sudo apt-get upgrade -y 


 

Step 2: Download Terraform

 

You need to download the terrafrom from official page by using the given command, In my case i am downloading 0.13 version, If you want to download any another version of terrafrom So click here for the same.

$ cd /tmp/
$ wget https://releases.hashicorp.com/terraform/0.15.0/terraform_0.15.0_linux_amd64.zip


 

Step 3: Unzip the Package

 

Its time install unzip package  to unzip terrafrom downloaded zip file, Execute the following command for the same.

 

To install unzip utility.

$ sudo apt-get install unzip -y


 

To unzip terrafrom zip file.

$ sudo unzip terraform*

Step 4: Binary Configuration


Now you need to copy the extract terrafrom binary file to /usr/local/bin directory to use terrafrom, Use the following command to achieve it.

$ sudo mv terraform /usr/local/bin


Step 5: Verify the Terraform Version

 

Get the installed terrafrom version by executing the below command.

$ terraform version

Step 6: Get Terraform Help

 

Also you can get manual of terrafrom command, Use the following command for the same.

$ terraform 


Install Terrafom using Bash Shell script

#!/bin/bash

cd /tmp/
wget wget https://releases.hashicorp.com/terraform/0.15.0/terraform_0.15.0_linux_amd64.zip
sudo unzip terraform*
sudo mv terraform /usr/local/bin
terraform version

Conclusion

In this post, We have successfully install Terrafrom on ubuntu 20.04 LTS server, Still you have any question, Please leave a comment.


How to Install Terraform on Ubuntu 20.04

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top