Tuesday, January 3, 2023

Terraform Open Source

  

Terraform Open Source

 WHAT IS TERRAFORM?

Terraform is an open source tool used for automating and managing infrastructure and platform and services as well.


Benefits:

Supports multiple providers like AWS,  Azure, GCP.
Declarative – define what end result you want
Management of existing infrastructure
Efficiency
Consistency

INFRASTRUCTURE AS CODE
An infrastructure setup is required to run an application which consist of multiple resources.
Phases of Terraform:
  •      Code: This creates a terraform file and, in that file, it has resources and sets of arguments to support that.
  •      Init: This downloads the necessary plugins needed to provision your infrastructure.
  •      Plan: This is a Terraform CLI command used to compare the desire state to what actually exist so day 1 it will notice you have none of the resources so you have create them.
  •      Apply: This is also a Terraform CLI command which take those resources and spin them up. Terraform leverages cloud provider API to create infrastructure resources and outputs the variables along the way.





TERRAFORM INSTALLATION

Download Terraform




Download terraform from official website  https://www.terraform.io/downloads.html

You can see the Windows 32 bit and 64 bit source files. download depends on your system here I am downloading 64 bit terraform. it will be downloaded as zip file.

Unzip the Terraform package

Extract the downloaded zip file. Here I downloaded the terraform zip file in C:\Users\devops\Downloads\. After extracting the zip file, you can see a terraform.exe file as shown below in C:\Users\devops\Downloads\terraform_0.12.23_windows_amd64

install terraform on windows

This is the workspace path of terraform in your system or you can say the path of terraform.exe.


Set Terraform as an environment variable

Go to your Control Panel and navigate to Systems as shown below.  Click on Advanced System Settings then select environment variables, in system variables you can see “Path” select path and click on edit and add path of terraform i.e  C:\Users\devops\Downloads\terraform_0.12.23_windows_amd64



install terraform on windows 10

We are done, Terraform has been successfully installed!!!

Verify Terraform Installation

Open gitbash and run terraform as shown below


No comments:

Post a Comment

Jenkins Scripted Pipeline - Create Jenkins Pipeline for Automating Builds, Code quality checks, Deployments to Tomcat - How to build, deploy WARs using Jenkins Pipeline - Build pipelines integrate with github, Sonarqube, Slack, JaCoCo, Nexus, Tomcat

  Jenkins Scripted Pipeline - Create Jenkins Pipeline for Automating Builds, Code quality checks, Deployments to Tomcat - How to build, depl...