Infrastructure as code
IaC Tool Comparison
Terraform, CloudFormation, CDK, Pulumi, or OpenTofu? Compare every major infrastructure-as-code tool side-by-side and get a personalized recommendation based on your team and workload.
Terraform
CloudFormation
AWS CDK
Pulumi
OpenTofu
Language
Terraform
HCL (HashiCorp Configuration Language)
CloudFormation
JSON or YAML templates
AWS CDK
TypeScript, Python, Java, C#, Go
Pulumi
TypeScript, Python, Go, C#, Java
OpenTofu
HCL (Terraform-compatible)
HCL (HashiCorp Configuration Language)
JSON or YAML templates
TypeScript, Python, Java, C#, Go
TypeScript, Python, Go, C#, Java
HCL (Terraform-compatible)
State Management
Terraform
State file (local, S3, Terraform Cloud). Locking via DynamoDB.
CloudFormation
Managed by AWS automatically. No external state file needed.
AWS CDK
Synthesizes to CloudFormation — state managed by AWS.
Pulumi
State in Pulumi Cloud (free tier), S3, or local file.
OpenTofu
State file (local, S3). Fully compatible with Terraform state.
State file (local, S3, Terraform Cloud). Locking via DynamoDB.
Managed by AWS automatically. No external state file needed.
Synthesizes to CloudFormation — state managed by AWS.
State in Pulumi Cloud (free tier), S3, or local file.
State file (local, S3). Fully compatible with Terraform state.
Cloud Support
Terraform
Multi-cloud (AWS, Azure, GCP, 3000+ providers)
CloudFormation
AWS only
AWS CDK
AWS only (via CloudFormation)
Pulumi
Multi-cloud (AWS, Azure, GCP, Kubernetes, 100+ providers)
OpenTofu
Multi-cloud (same provider ecosystem as Terraform)
Multi-cloud (AWS, Azure, GCP, 3000+ providers)
AWS only
AWS only (via CloudFormation)
Multi-cloud (AWS, Azure, GCP, Kubernetes, 100+ providers)
Multi-cloud (same provider ecosystem as Terraform)
Learning Curve
Terraform
Moderate — HCL is purpose-built and readable but new syntax to learn.
CloudFormation
Moderate — verbose YAML/JSON; deep AWS knowledge required.
AWS CDK
Low for developers — uses familiar programming languages and IDE support.
Pulumi
Low for developers — real code with loops, conditions, and abstractions.
OpenTofu
Same as Terraform — drop-in replacement with identical HCL syntax.
Moderate — HCL is purpose-built and readable but new syntax to learn.
Moderate — verbose YAML/JSON; deep AWS knowledge required.
Low for developers — uses familiar programming languages and IDE support.
Low for developers — real code with loops, conditions, and abstractions.
Same as Terraform — drop-in replacement with identical HCL syntax.
Community Size
Terraform
Very large — most popular IaC tool. Huge module registry.
CloudFormation
Large — extensive AWS docs and examples. AWS-curated modules.
AWS CDK
Growing — backed by AWS. Construct Hub has thousands of constructs.
Pulumi
Medium — active community, growing registry of components.
OpenTofu
Growing — Linux Foundation backed. Inherits Terraform ecosystem.
Very large — most popular IaC tool. Huge module registry.
Large — extensive AWS docs and examples. AWS-curated modules.
Growing — backed by AWS. Construct Hub has thousands of constructs.
Medium — active community, growing registry of components.
Growing — Linux Foundation backed. Inherits Terraform ecosystem.
Pricing
Terraform
BSL 1.1 license (since v1.6). Free CLI. Terraform Cloud has paid tiers.
CloudFormation
Free (you pay only for AWS resources provisioned).
AWS CDK
Free and open source (Apache 2.0).
Pulumi
Free open-source CLI. Pulumi Cloud free tier; paid plans for teams.
OpenTofu
Free and open source (MPL 2.0). No paid tiers.
BSL 1.1 license (since v1.6). Free CLI. Terraform Cloud has paid tiers.
Free (you pay only for AWS resources provisioned).
Free and open source (Apache 2.0).
Free open-source CLI. Pulumi Cloud free tier; paid plans for teams.
Free and open source (MPL 2.0). No paid tiers.
Best For
Terraform
Multi-cloud teams, platform engineering, mature DevOps orgs.
CloudFormation
AWS-only shops wanting native integration and no external tooling.
AWS CDK
Developer teams who prefer TypeScript/Python over config languages.
Pulumi
Polyglot teams wanting multi-cloud IaC with real programming languages.
OpenTofu
Teams wanting open-source Terraform without BSL license concerns.
Multi-cloud teams, platform engineering, mature DevOps orgs.
AWS-only shops wanting native integration and no external tooling.
Developer teams who prefer TypeScript/Python over config languages.
Polyglot teams wanting multi-cloud IaC with real programming languages.
Teams wanting open-source Terraform without BSL license concerns.
Master IaC in live AWS playgrounds
Deploy real infrastructure with Terraform, CDK, and CloudFormation in guided missions on live AWS accounts — no simulations.
Start building free →