What is Terraform?

Terraform is an open-source “Infrastructure as Code” software tool made by HashiCorp. It allows developers to change, build, and version infrastructure by describing the desired “end-state” of the infrastructure.

Terraform can manage infrastructures that might include low-level components such as storage or high-level components such as DNS entries.

To learn more about the features of Terraform, click here.

How Terraform works?

Since Terraform is a declarative coding tool, developers can use a high-level configuration language called HashiCorp Configuration Language (HCL). HCL is used to describe the desired end-state of the infrastructure.

The illustration below shows how Terraform works:

  1. The developer provides the configuration files of the desired infrastructure as the first input source.

  2. Terraform takes in the current state of the infrastructure as the second input source.

  3. It then produces an execution plan describing what it will do to reach the desired end-state and then executes it to build the defined infrastructure.

  4. Terraform has access to many providers like AWS. This allows the user to access all the provider’s resources. The providers enable Terraform to create the infrastructure on different levels.

How Terraform works?
Copyright ©2024 Educative, Inc. All rights reserved