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 https://www.terraform.io/downloads.html here for your system and download it.

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

install terraform

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.

install terraform

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:

install terraform
install terraform

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.

install terraform

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

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