๐ŸŒ

Terraform

Terraform is an infrastructure-as-code tool built by HashiCorp, with a free/open-source core (under the Business Source License) plus a paid Terraform Cloud offering. It ranks #16 among dev tools in usage surveys at roughly 17.8% share. It describes cloud resources โ€” servers, networks, databases, DNS records, across AWS, Azure, GCP, and dozens of other providers โ€” in declarative configuration files, so entire environments can be created, versioned, reviewed, and reproduced automatically instead of clicked together by hand.

Quick facts
Type: Infrastructure as Code (IaC)
Made by: HashiCorp
License: Free/open-source core (Business Source License); paid Terraform Cloud/Enterprise
Platforms/Hosting: Cross-platform CLI; manages resources across AWS, Azure, GCP, and 100+ other providers
Primary use case: Declaratively provisioning and versioning cloud infrastructure across one or many providers
Jump to: ExampleGetting startedBest for

Example

Terraform configs are written in HCL (HashiCorp Configuration Language) โ€” this declares a single AWS EC2 instance.

# main.tf
provider "aws" {
  region = "us-east-1"
}

resource "aws_instance" "web" {
  ami           = "ami-0c55b159cbfafe1f0"
  instance_type = "t3.micro"

  tags = {
    Name = "web-server"
  }
}

Getting started

Install the Terraform CLI, then the standard workflow is init โ†’ plan โ†’ apply.

# macOS via Homebrew
brew install hashicorp/tap/terraform

# standard workflow in a directory with .tf files
terraform init
terraform plan
terraform apply
Best for: Teams managing cloud infrastructure across one or more providers who want that infrastructure version-controlled, code-reviewed, and reproducible โ€” especially useful once an environment grows too complex to safely manage by clicking through a cloud console.