Terraform is popularly known as “Infrastructure as a Code” tool. Terraform is a free and opensource declarative coding tool that allows you to automate and manage your IT infrastructure and various services that run on cloud and on-premise servers. It is Created by Hashicorp.
Terraform has simple syntax to efficiently and safely provision onto on-premise and cloud platforms such as Amazon Web Services, Google Cloud Platform,Microsoft Azure etc. In this tutorial, you will learn how to install Terraform on Ubuntu 20.04.
- Ubuntu 20.04 installed machine.
- Good Internet connection.
First of all, go to the official Terraform download site and download the latest zip file. By the time of writing down this guide, the latest version is Terraform 0.13.4. You can install either 32 bit or 64 bit package as per your OS architecture.
You can download it using below command.
$ cd /tmp $ wget https://releases.hashicorp.com/terraform/0.13.4/terraform_0.13.4_linux_amd64.zip
Extract the Tar File
Once terraform latest file downloaded, unzip the file to the /usr/local/bin path using the -d switch as shown below.
$ sudo unzip terraform_0.13.4_linux_amd64.zip -d /usr/local/bin Archive: terraform_0.13.3_linux_amd64.zip inflating: /usr/local/bin/terraform
There is another way, you can locally unzip the file in your current working directory and later move the unzipped directory into the /usr/local/bin destination.
$ unzip terraform_0.13.4_linux_amd64.zip $ mv terraform /usr/local/bin
Verify the Installation
To confirm that everything went as expected, execute the following command to verify whether installation is successful or not.
$ terraform -version
This would result below output.
Finally, you are done installing Terraform. The output confirms that terraform is successfully installed on the system. Installing Terraform is quite a simple and straightforward procedure.
Hence, you have learnt how to install Terraform on Ubuntu 20.04. Stay tuned for more devops tutorials.
Read Also : Git Tutorial – Practical Git Commands (Part-1)