Email: evarainbow@evarainbow.com

HashiCorp Terraform – Evaluate Cisco Automation and Orchestration Technologies

Terraform is Infrastructure-as-Code (IaC) open source tool created by HashiCorp. Terraform is used to automate and orchestrate the provisioning, configuration and management of resources and infrastructures across data centers and hybrid cloud environments. It can manage low-level components like compute, storage, and networking resources, as well as high-level components from the application stack and SaaS features.

Terraform is compatible with various operating systems, including Windows, macOS, and many Linux distributions and can make API calls on your behalf to one or more providers, such as Cisco, Amazon Web Services (AWS), Azure, Google Cloud, Digital Ocean, and others.

To learn more about Terraform, visit https://www.terraform.io

If you want to use it, you need to download and install the binary package from HashiCorp. You can do this by downloading it from their repository, or you can use some of the popular package managers.

For the manual installation, the procedure is as follows:

• Download the appropriate package for your operating system as a zip archive

• Unzip the package to get the single binary named Terraform, with the accompanying files

• Make sure that the Terraform binary is included in your PATH.

Alternate methods will be to use package managers, and the decision which one to use depends mostly on the operating system that you use. An example is the Chocolatey package manager for Windows. It’s an open source package management and once you have it installed then the Terraform installation happens with the command:

$choco install terraform

To verify the installation of Terraform, from the command line, just use the command

$terraform -help

If the installation was successful, it will list the available Terraform sub-commands,

More information and installation options are available at https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli

Terraform Concept

Terraform communicates with the managed resources using application programming interfaces (APIs). To know how exactly to communicate with the different resources, Terraform uses providers, which are open-source plug-ins that expose the implementation for specific services and infrastructures. They abstract the API layer of real resources, allowing Terraform to create, manage, and update the needed resources. Each provider has its documentation describing the resource types and their arguments. Providers must be declared in the configurations for Terraform to install and use them. They can be categorized as Official, Partner, or Community providers. The publicly available providers can be found in the Terraform Registry. There are providers for different vendors and service providers, such as Cisco Systems, Amazon AWS, Microsoft Azure, google Cloud Platform, and omany others.

The workflow can be summarized in three separate stages:

• Write: during this initial stage are defined the resources and the needed configuration.

• Plan: based on the write stage definitions, Terraform will create an execution plan, which will contain the steps and needed configuration that will be applied to the managed resources.

• Apply: after the plan has been approved, then Terraform will perform the needed steps accordingly and it will apply the needed configurations and changes, as it respects the dependencies among the different resources.

For each of these stages are used different commands and components. Once the the apply stage is done, then can be performed additional steps, such the removal of unneeded resources and getting the current state of the infrastructure.

Leave a Reply

Your email address will not be published. Required fields are marked *