Linux | Cloud | DevOps | Scripting

Breaking

Tuesday, 18 June 2019

Terraform Installation


We used Terraform for provisioning purpose. Terraform is an open-source infrastructure as code software tool created by HashiCorp. It enables users to define and provision a data center infrastructure. Terraform supports the modern data center (IaaS, PaaS, SaaS). Terraform can manage anything using API.

  1. Open source
  2. First release 28 July 2014
  3. One release in every two weeks
  4. More than 700 contributors 
  5. More than 6200 GitHub stars

Prior to Terraform, the user had to guess change ordering, parallelization, and rollout effect. 

Install Terraform:

Go to the below-mentioned link and download Terraform:

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


https://www.terraform.io/downloads.html
Terraform supporting Operatig Systems

This will prompt a number of OS. Choose and select the OS and download. Based on your OS, you need to run certain commands:

Install Terraform in LINUX:

$ sudo yum install -y wget

Open link https://www.terraform.io/downloads.html, right click on bit architecture and click on 'Copy link address'

Change directory, where you want to download this link.

$ cd /tmp

$ sudo wget <paste_your_copied_link_from_terraform.io>

$ sudo yum install -y zip unzip

$ unzip terraform_amd.zip

As we do unzip, this will create a directory named terraform.

$ sudo mv terraform /usr/local/bin

Install Terraform in WINDOWS:

Download Terraform file from URL: https://www.terraform.io/downloads.html. Click once on bit architecture. This will download a compressed folder of Terraform.

Extract zip file

Copy folder in c drive as C:\terraform

Set the environment variable path. For this follow the steps:

Right click on My Computer ➔ Properties ➔ Advanced System Settings ➔ Environment Variable ➔ New ➔ Variable name: Terraform ➔ Variable value: C:\terraform ➔ OK ➔ OK.

Install Terraform in MAC:

Open a terminal in Mac and run the command:

$ brew install Terraform

This will automatically download, unzip and move to the appropriate folder. There is no need to run any other command.


Verify Terraform is installed or not:

$ terraform -version

Update to the latest version:

To update Terraform, we just need to download updated Terraform and extract it to its environment variable path, which we are using like C:\terraform. 






No comments:

Post a Comment

Pages