Terraform — Infrastructure as Code tool from HashiCorp (2014). You declare desired state of cloud resources in HCL (HashiCorp Configuration Language), terraform apply creates/updates. Supports AWS, GCP, Azure, Yandex Cloud, Cloudflare, GitHub — via 3000+ providers. August 2023: HashiCorp changed license from MPL to BSL (Business Source License) → community fork **OpenTofu** (Linux Foundation, 100% compatible).
Below: details, example, related terms, FAQ.
# AWS EC2 instance
resource "aws_instance" "web" {
ami = "ami-0c55b159cbfafe1f0"
instance_type = "t3.small"
tags = { Name = "WebServer" }
}
# Remote state in S3
terraform {
backend "s3" {
bucket = "tfstate"
key = "prod/terraform.tfstate"
region = "us-east-1"
}
}OpenTofu: free, MPL license, Linux Foundation. Terraform: BSL (non-commercial ok, commercial vendors restricted). For most teams — OpenTofu safer long-term.
Remote backend mandatory for teams: S3 + DynamoDB (lock), Terraform Cloud, or gitlab-managed-terraform-state. Local state = race conditions.
Pulumi — IaC in real programming languages (TS, Python, Go). Terraform — HCL DSL. Pulumi better for developers, Terraform for sysadmins.