Skip to content
Latchkey

Terraform vs CloudFormation: Multi-Cloud vs AWS-Native IaC

Terraform is multi-cloud IaC with HCL and a huge provider ecosystem; CloudFormation is AWS-native, deeply integrated, and state-managed by AWS.

Terraform provisions infrastructure across many clouds and services using HCL and a vast provider registry, with state you manage. CloudFormation is AWS's native IaC service - templates in YAML/JSON, state and drift handled by AWS, and tight integration with AWS features like change sets and stack policies.

TerraformCloudFormation
ScopeMulti-cloud + many providersAWS only
LanguageHCLYAML / JSON
StateSelf-managed backendManaged by AWS
EcosystemHuge (registry, modules)AWS-native, CDK on top
Best forMulti-cloud, broad toolingAll-in AWS shops

In CI

Terraform is the default when you span clouds or want a rich module ecosystem, but you own the state backend and locking. CloudFormation is compelling for AWS-only shops - no state to manage, native change sets, and the latest AWS features often land there first. Both plan and apply cleanly in CI; mind state locking with Terraform and stack drift with CloudFormation.

Speed it up

Cache provider plugins (Terraform) and run plan/apply in CI with locking. The provider downloads and plan run on CI runners; faster managed runners shorten cold setup.

The verdict

Multi-cloud or want the broad ecosystem and modules: Terraform. All-in on AWS and want managed state with native integration: CloudFormation. Pick by cloud scope and how much state management you want to own.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →