100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
DevOps

Terraform

By HashiCorp

IntermediateTool9.2K learners

Terraform is HashiCorp's open-source infrastructure-as-code tool for defining, provisioning, and managing cloud and on-premises infrastructure through declarative configuration files.

Definition

Terraform is HashiCorp's open-source infrastructure-as-code tool for defining, provisioning, and managing cloud and on-premises infrastructure through declarative configuration files.

Overview

Terraform lets teams describe the desired state of their infrastructure — servers, networks, databases, load balancers — in a human-readable configuration language (HCL), rather than clicking through cloud consoles or writing imperative scripts. Terraform compares this desired state against the real infrastructure using a state file, computes the difference, and generates an execution plan showing exactly what will be created, changed, or destroyed before anything is applied. This provider-based architecture is what gives Terraform its broad reach: providers exist for AWS, Azure, Google Cloud, and hundreds of other services, letting a single tool and workflow manage infrastructure across multiple clouds and even manage resources inside a Kubernetes cluster. Modules allow teams to package and reuse common infrastructure patterns — a standard VPC layout or a Kubernetes cluster setup — across projects and environments. Terraform is often discussed alongside configuration-management tools like Ansible: Terraform focuses on provisioning the infrastructure itself, while Ansible (or Terraform's own provisioners) typically handles configuring software once machines exist. It's also part of a broader HashiCorp toolchain that includes Vault for secrets management and Packer for building machine images. Because infrastructure as code is now a baseline DevOps skill, courses like Terraform & Infrastructure as Code and posts such as Infrastructure as Code Explained: Terraform Basics are common starting points for engineers picking it up.

Key Features

  • Declarative configuration language (HCL) describing the desired end-state of infrastructure
  • Execution plans that preview exactly what will change before anything is applied
  • State file tracking the real-world resources Terraform manages
  • Provider ecosystem covering AWS, Azure, GCP, Kubernetes, and hundreds of other services
  • Reusable modules for packaging common infrastructure patterns
  • Remote state backends and locking for safe collaboration across teams
  • Import capability for bringing existing, manually created infrastructure under management
  • Workspaces for managing multiple environments (dev, staging, prod) from one configuration

Use Cases

Provisioning cloud infrastructure consistently across AWS, Azure, and GCP
Managing multi-environment setups (dev/staging/production) from shared modules
Standing up Kubernetes clusters and their supporting cloud resources
Enforcing peer-reviewed, version-controlled infrastructure changes via pull requests
Disaster recovery — rebuilding entire environments from code after an outage
Managing DNS, networking, and security group configuration as code

History

Terraform is an open-source infrastructure-as-code tool from HashiCorp that lets teams define, provision, and manage cloud and on-prem infrastructure declaratively across many providers. HashiCorp was founded in 2012 by Mitchell Hashimoto and Armon Dadgar, and after AWS introduced CloudFormation in 2011, Hashimoto argued publicly for an open-source, cloud-agnostic equivalent. HashiCorp released Terraform 0.1 in July 2014, initially supporting only AWS and DigitalOcean. Adoption was slow for its first 18 months but accelerated dramatically from around 2017 as the provider ecosystem grew, and Terraform became the de-facto standard for multi-cloud infrastructure as code.

Frequently Asked Questions

From the Blog