Terraform alternatives/vs CloudFormation/2026

Terraform vs CloudFormation

CloudFormation is AWS's own IaC service: declarative templates, state managed by AWS, and no service fee. If your world is entirely AWS, it removes both the license question and the platform bill. Here's the honest head-to-head.

Verdict

Pick CloudFormation (or AWS CDK on top of it) if you're AWS-only and want zero extra licensing, vendors or platforms — it's free, supported by AWS, and compliance teams like it. Pick Terraform or OpenTofu if you touch anything beyond AWS — a second cloud, Cloudflare, Datadog, GitHub — or want faster deployments and no 500-resource stack cap. Multi-cloud reality, not preference, usually decides this one.

Side by side

Terraform vs AWS CloudFormation

 TerraformAWS CloudFormation
Scope Multi-cloud + thousands of SaaS providers AWS only
CostCLI free (BSL); HCP $0.10–$0.99/resource/moFree for AWS resources (3rd-party types/hooks billed)
LanguageHCLJSON / YAML (or CDK languages on top)
StateYour backend (S3 etc.) or HCPManaged by AWS — nothing to host or secure
Drift detectionOn plan / paid platform features built into the service
Scale limitsNo hard per-config cap500 resources per stack; nested stacks beyond
Speed on big changes generally faster appliesLarge stacks deploy slowly
RollbackNo automatic rollback (fix forward) automatic rollback on failure
LicenseBSL 1.1 (OpenTofu: MPL-2.0)Proprietary AWS service

Sources: CloudFormation pricing · CloudFormation quotas · HCP Terraform pricing. Compiled July 2026.

A fair call

Which one fits you

Choose CloudFormation if…

  • You're AWS-only and expect to stay that way.
  • Compliance prefers a first-party, fully managed service with no extra vendor.
  • You want automatic rollback and built-in drift detection without a platform bill.
  • Your developers would rather write CDK code than learn HCL.

Choose Terraform / OpenTofu if…

  • You manage anything beyond AWS — a second cloud, DNS, monitoring, Git platforms.
  • You're bumping into the 500-resource stack cap or slow stack deployments.
  • You want one language and one workflow across every environment.
  • Portability of skills and modules across employers/clouds matters.

Common questions

Terraform vs CloudFormation — common questions

Is CloudFormation free?

Effectively yes for standard use. AWS doesn't charge for the CloudFormation service when you manage AWS resources — you pay only for the resources your stacks create. Charges apply for third-party resource types and for hook invocations beyond the free allowance. That makes it cheaper than any managed Terraform platform for AWS-only estates.

What is the CloudFormation 500-resource limit?

A single CloudFormation stack can contain at most 500 resources. Larger systems must be split across nested stacks or multiple stacks, which adds orchestration complexity. Terraform and OpenTofu have no equivalent hard cap per configuration, though very large states bring their own performance considerations.

Should AWS-only teams use Terraform or CloudFormation?

If you're certain you'll stay AWS-only, CloudFormation (or the CDK on top of it) is free, fully supported by AWS, and integrates tightly with services like Service Catalog and Control Tower. Terraform or OpenTofu is the better pick if there's any chance of a second cloud or of managing SaaS resources — the provider ecosystem covers thousands of services — or if your team already knows HCL. Many AWS shops run both: CloudFormation where AWS mandates it, Terraform for everything else.