Kovair DevOps and Terraform Integration Plugin

Listen to this article

Terraform Plugin Details

Plugin Version: 0.12.26

Overview

Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in-house solutions. Configuration files describe to Terraform the components needed to run a single application or your entire datacenter. Terraform generates an execution plan describing what it will do to reach the desired state, and then executes it to build the described infrastructure. As the configuration changes, Terraform is able to determine what changed and create incremental execution plans which can be applied. The infrastructure Terraform can manage includes low-level components such as compute instances, storage, and networking, as well as high-level components such as DNS entries, SaaS features, etc.

Terraform Information:

 More information can be found at Terraform.

Version Supported:

This plugin was developed and tested against version : 0.12.26

Plugin Operation:

1. Init
The terraform init command is used to initialize a working directory containing Terraform configuration files. This is the first command that should be run after writing a new Terraform configuration or cloning an existing one from version control. It is safe to run this command multiple times.

Input parameter(s):

Parameter Is Mandatory Help Text
Terraform Directory Path true Location of main.tf file directory.
Error Text false If given text found in console log, overall task status will be error. To concat multiple error text use ‘||’ operator.
Additional Options false Provide the additional options.ex. -input=false.
Output parameter(s):

Parameter Help Text
TerraformStatus Status of the operation
TerraformLog Console log of the operation

2. Plan

The terraform plan command is used to create an execution plan. Terraform performs a refresh, unless explicitly disabled, and then determines what actions are necessary to achieve the desired state specified in the configuration files.

Input parameter(s):

Parameter Is Mandatory Help Text
Terraform Directory Path true Location of main.tf file directory.
Error Text false If given text found in console log, overall task status will be error. To concat multiple error text use ‘||’ operator.
Additional Options false Provide the additional options.ex. -input=false.
Output parameter(s):
Parameter Help Text
TerraformStatus Status of the operation
TerraformLog Console log of the operation

3. Apply

The apply operation shows us the same plan output and asks us to confirm if we actually want to proceed with this plan. So while plan is available as a separate command, it’s mainly useful for quick sanity checks and during code reviews, and most of the time we’ll run apply directly and review the plan output it shows you.

Input parameter(s):

Parameter Is Mandatory Help Text
Terraform Directory Path true Location of main.tf file directory.
Error Text false If given text found in console log, overall task status will be error. To concat multiple error text use ‘||’ operator.
Additional Options false Provide the additional options.ex. -input=false.
Output parameter(s):
Parameter Help Text
TerraformStatus Status of the operation
TerraformLog Console log of the operation

4. Destroy

The terraform destroy command is used to destroy the Terraform-managed infrastructure.

Input parameter(s):

Parameter Is Mandatory Help Text
Terraform Directory Path true Location of main.tf file directory.
Error Text false If given text found in console log, overall task status will be error. To concat multiple error text use ‘||’ operator.
Additional Options false Provide the additional options.ex. -input=false.
Output parameter(s):
Parameter Help Text
TerraformStatus Status of the operation
TerraformLog Console log of the operation

Pass/Fail Condition

Status Condition

Passed

All Path should be valid.

Failed If the console log contains any of the value of Error Text field value.
Failed Outputlog should contain ‘Unable to determine the workspace’..
Failed Outputlog should contain ‘NO SUCH FILE OR DIRECTORY’..
Failed Outputlog should contain ‘FULLYQUALIFIEDERRORID’..
Failed Outputlog should contain ‘ERROR: MISSING ARGUMENT TO OPTION’..
Failed Outputlog should contain ‘DOESN’T EXIST OR CAN’T BE OPENED’..
Failed Outputlog should contain ‘JAVA.RMI.CONNECTEXCEPTION’..
Failed Outputlog should contain ‘JAVA.SECURITY.CERT.CERTIFICATEEXCEPTION’..

 

Limitations:

  1. Providing input at runtime is not supported.
  2. Don’t use -no-color as additional option. This is already used internally.

Release Details:

Terraform : 0.12.26
Initial version with basic functionalities.

Contact us:

    Yes, I accept the Privacy Statement and want to receive latest information from Kovair.