Terraform vs Pulumi

Two IaC approaches — HCL state files vs real programming languages.

Aspect🏗️ Terraform Pulumi
LanguageHCL (.tf files)TypeScript, Python, Go, C#, Java, YAML
StateLocal or remote (S3, Terraform Cloud)Pulumi Service or self-managed backend
EcosystemLargest provider catalog, modules registryStrong AWS/Azure/GCP, growing community
Testingterratest, plan in CI, policy (OPA/Sentinel)Unit tests in your language, integration tests
Team fitOps/platform teams, declarative standardDev teams who prefer code over HCL
Lock-inLow — open source coreLow — open source, optional SaaS state

When to use which

Terraform

Industry default, huge module library, and your team already knows HCL.

Pulumi

You want loops, classes, and real tests in TypeScript/Python for complex infra.

Templates & guides