Introduction to Terraform

What is Terraform

Terraform is a tool use for building, changing, and versioning infrastructure safely and efficiently. It can manage existing and popular service provider along with in house solutions.

It uses HashiCorp Configuration Language (HCL) to manage environments of Operators and Infrastructure teams.

The configuration file, which is use to describe it to run a single file or entire data center. It is use to generate an execution plan which describes about the working of code up till it reach to the desired state. And then executes it to build the described infrastructure.

As if any change is apply in configuration then it is able to determine the change and create incremental execution plans which can be applied.

It is use to manage low level (Compute instance, storage, and networking) as well as high level (DNS entries, SaaS features, etc) components.

Features of Terraform :-

  • Infrastructure as Code – It is described using high level configuration syntax. In this we can code and build the resource, provide necessary credentials for the given IaaS provider, and by the use of terraform we can build and manage the created resources.
  • Execution Plans – This is the best thing of terraform, when we create any terraform configuration, before apply it will show us execution plan about what it is use to perform after call apply.
  • Resource Graph – It is use to build graph of all your resources, and simultaneously the creation and modification of any non dependent rescues. By this the user get insight into dependencies in their infrastructure.
  • Change Automation – By this we can apply any complex change sets to our infrastructure with minimal human interaction.

Advantages of Terraform

  • Platform Agnostic – Now a days in single datacenter we have several different clouds and platforms to support various applications. With the help of it we can manage heterogeneous environment in single workflow by creating a configuration file. To fit the needs of project or organization.
  • State Management – Terraform is use to create a state file when project is first initialized. It uses this local state to create plans and make changes in the infrastructure. Before any operation it will update the state with real infrastructure. If any change is made or a resource is appended to a configuration. Terraform is use to compares those changes with state file to show what changes are to be done with the update in new resource or resource modification.
  • Operator Confidence – Terraform will do the task according to the plan it will not going to interrupt the previous configuration of any operator.

Workflow

  • Scope – Confirm what resources need to be created for a given project.
  • Author – Use to create a configuration file in HCL, according to the scoped parameters.
  • Initialize – Use “terraform init” in the project directory with the configuration files. By this the correct provider plugins will be download for the project.
  • Plan & Apply – Use “terraform plan” for verifying the creation process and then use “terraform apply” to execute .tf file. Which is use to create real resources as well as state file to compares the future changes of configuration files.

Use Cases

  • Heroku App Setup – It is use to ensure that all the add-ons are available. And also do configuration of DNSimple to set a CNAME, or setting up cloudflare as a CDN for the app. This all task is performed by terraform in under 30 seconds without using web interaction.
  • Multi-Tier Application – In this each tier can be described as a collection or resources, terraform is use to handle the resources as well as dependencies between the tiers automatically. Terraform use to ensure the database tier is available before server get start. By modifying single count configuration value then we can scale each tier easily.
  • Self-Service Clusters – Terraform configuration can be share within an organization enabling customer teams to use the configuration as a black box. And it is use as a tool to manage their services.
  • Software Demos – By the help of terraform which allows end users to easily demo the software on their own infrastructure.
  • Disposable Environments – Terraform can help tame the difficulty of maintaining parallel environments, and makes it practical to elastically create and destroy them.
  • Software Defined Networking – With the help of terraform the user can automatically setup as well as modify settings by interfacing with the control layer.
  • Resource Schedulers – Terraform is not only limited to physical providers like AWS. This allows terraform to be use as layers. To setup the physical infrastructure running the schedulers as well as provisioning onto the scheduled grid.
  • Multi-Cloud Deployment – In this terraform is use to manage multiple cloud providers, and to even handle cross-cloud dependencies. Is use to help operator to build large-scale multi-cloud infrastructures.

In case of any help or query, please contact us or raise a ticket.

Category(s) cloud
. . .

Comment

Add Your Comment

Be the first to comment.

css.php