Terraform execution in pipeline

Terraform is the infrastructure as a code offering from HashiCorp. It is a tool for building, changing, and managing infrastructure in a safe, repeatable way. Operators and Infrastructure teams can use Terraform to manage environments with a configuration language called the HashiCorp Configuration Language (HCL) for human-readable, automated deployments.

Infrastructure as Code
If you are new to infrastructure as code as a concept, it is the process of managing infrastructure in a file or files rather than manually configuring resources in a user interface. A resource in this instance is any piece of infrastructure in a given environment, such as a virtual machine, security group, network interface, etc.
Install Terraform plugin
Go to Manage Jenkins > Manage Plugins >Available > search Terraform.
If we are already installed Terraform Plugin on your Jenkins It will display in the Installed section.
Now we can see the Terraform option in the Build Environment section but we need to configure Terraform for Jenkins.

Configure Terraform
Go to Manage Jenkins > Global Tool Configuration > It will display Terraform on the list.
Now let’s Create New project to execute Terraform from Jenkins.
Create a New Project
*Open Jenkins > New Item. Enter any job name > Choose Pipeline > Click OK.
Pipeline Script:
We configure our first terraform pipeline on Jenkins.

Recent Comments

No comments

Leave a Comment