How To Install Terraform In Linux

What Is Terraform?

Terraform is a tool for creating, Managing and Modifying the Infrastructure.

It supports multiple cloud providers such as Amazon Web service, Azure and Google Cloud.

Here you will write a configuration file describing the infrastructure components.

Ways Of Installing Terraform:

Terraform is distributed as a binary package for all the supported platforms and architectures.

There are two ways you can install terraform in your machine.

  1. Using binary package (.zip)
  2. Compiling from source

Installing Terraform:

In this tutorial, Let us see how to install terraform using binary package (.zip) file.

To install terraform, you can find the appropriate package here for your system and download it.

For example: I have ubuntu 64-bit operating system, So I will download Linux 64-bit package.

Click and download your appropriate package based on your Operating system and architecture (34-bit or 64-bit).

After downloading terraform package, unzip the package.

Terraform runs using single binary named terraform

Final step is to make sure terraform binary file is on the correct path.

To do this: You can copy the terraform binary file to /usr/local/bin directory

Verifying The Installation:

After installing terraform, Check whether terraform is correctly installed and configured.

Open a new terminal and run terraform

If you see the following output, Terraform is properly installed.

Let’s check the terraform version:

if you get any error that terraform cannot be found, Check whether terraform binary / environment PATH is properly set.

You can add any of these commands to –help flag to get more information.

We have successfully installed and configured terraform on the local machine.

Please do check out my others articles that might be helpful.