Home/Glossary/Terraform

Terraform

An open-source tool for managing cloud and on-premises infrastructure through declarative configuration files.

Terraform is an Infrastructure as Code (IaC) tool by HashiCorp. It allows you to define network topology, virtual machines, databases, and security policies using a declarative language called HCL. Instead of manual provisioning through cloud consoles, engineers specify the desired infrastructure state in text files that can be version-controlled.

How it works

The workflow follows three main steps: writing code, planning (terraform plan), and applying changes (terraform apply). Terraform maintains a state file to track current resources and calculates the delta between the actual environment and the configuration. This ensures idempotency, meaning re-running the same code results in no changes if the infrastructure already matches the definition.

The ecosystem includes over 2,000 providers, covering AWS, Azure, Google Cloud, and Kubernetes. This enables management of multi-cloud environments through a single tool. Using modules allows teams to package and reuse infrastructure patterns across dev, staging, and production environments, minimizing manual errors.

Industry benchmarks indicate that IaC tools reduce infrastructure deployment time by up to 80% compared to manual processes. In production scenarios, Terraform is typically triggered within CI/CD pipelines to automate resource provisioning and updates directly from Git repositories.