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.
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:
The developer provides the configuration files of the desired infrastructure as the first input source.
Terraform takes in the current state of the infrastructure as the second input source.
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.
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.