AWS CloudFormation vs Terraform
AWS CloudFormation
aws.amazon.comTerraform
developer.hashicorp.comSide by side
| Figure | AWS CloudFormation | Terraform |
|---|---|---|
| Price from | Free | $0.10/mo |
| Free plan | Yes | Yes |
| Free trial | — | Yes |
| Open source | — | — |
| Web | Yes | Yes |
| Windows | Yes | Yes |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| iOS | Yes | — |
| API | Yes | Yes |
| Self-hosted | — | Yes |
| Plans published | 3 | 10 |
| Spec score · IT Configuration Management Software | 9.1 (#1) | 8.6 (#9) |
| Spec score · Infrastructure Policy as Code Tools | 9.1 (#1) | 8.7 (#4) |
| Spec score · Infrastructure as Code Tools | 9.0 (#2) | 8.7 (#3) |
| Spec score · Infrastructure Automation | 9.1 (#2) | 8.7 (#6) |
| Spec score · Cloud Orchestration Software | 9.0 (#3) | 8.6 (#5) |
| Founded | 2006 | 2012 |
| Purpose | CloudFormation models, provisions, and manages related AWS and third-party resources as infrastructure as code. | Terraform is an infrastructure-as-code tool for defining, provisioning, and managing cloud and on-premises resources through human-readable configuration files. |
| Rating on Capterra | 4.5 out of 5 from 112 reviews | 4.8 out of 5 from 51 reviews. |
| Rating on G2 | 4.4 out of 5 from 207 reviews | 4.7 out of 5 from 92 reviews. |
| Rating on Gartner Peer Insights | 4.4 out of 5 from 110 ratings | 4.5 out of 5 from 125 ratings. |
| Security model | AWS documents CloudFormation security through shared responsibility, IAM access control, CloudTrail logging, data protection, resilience, and compliance guidance. | HCP Terraform uses TLS 1.2, isolated ephemeral execution environments, multiple availability zones, backups, and Vault-backed encryption at rest. |
| Stacks | A stack groups related resources so they can be created, updated, or deleted as one unit. | Stacks manage multiple infrastructure modules and repeat infrastructure deployments at scale alongside workspaces. |
| What it does | AWS CloudFormation models, provisions, and manages AWS resources from declarative templates. | Terraform is an infrastructure-as-code tool for building, changing, and versioning compute, storage, networking, DNS, and SaaS infrastructure. |
Plans
AWS CloudFormation
- AWS CloudFormationFree
- CloudFormation serviceFree
- Third-party resource providersFree
Terraform
- FreeFree
- StandardPriced on request
- PremiumPriced on request
- HCP Terraform FreeFree
- Terraform Community EditionFree
- HCP Terraform Essentials$0.10 a month
- HCP Terraform Standard$0.47 a month
- HCP Terraform Premium$0.99 a month
- EssentialsPrice not published
- Terraform EnterprisePriced on request
In their own words
AWS CloudFormation
AWS CloudFormation models, provisions, and manages related AWS and third-party resources as infrastructure as code. YAML or JSON templates define AWS resources and their properties. StackSets deploy a common set of resources across multiple AWS accounts and Regions; Change Sets preview proposed stack updates, including possible deletion or replacement, and Drift Detection tracks changes made outside the service. For authoring, AWS CDK supports TypeScript, Python, Java, and .NET, while AWS SAM offers shorthand YAML for serverless resources that is converted during deployment. The CloudFormation Registry supports third-party resources and modules, and stacks can be updated from remote Git repositories. The service is available through API, Linux, macOS, web, and Windows, and manages state. CloudFormation itself has a free plan, with no additional charge for AWS and Alexa resource providers, but created AWS resources are billed at their standard rates. Third-party provider and custom hook operations may also incur charges. Access can be managed with IAM, and CloudTrail logs API calls.
Terraform
Terraform is an infrastructure-as-code tool for defining, provisioning, and managing cloud and on-premises resources through human-readable configuration files. Its core process is to write a configuration, review an execution plan, then apply approved changes. Providers connect Terraform to services through APIs, and the Terraform Registry lists providers for AWS, Azure, Google Cloud, Kubernetes, GitHub, and Splunk. Modules package reusable infrastructure configurations that users can find or publish in the Registry. The free Community Edition is a downloadable command-line tool. HCP Terraform adds remote execution, repository connections to GitHub, GitLab, and Bitbucket that can trigger plans after changes, and an API. It stores state remotely with encryption at rest and offers workspaces, single sign-on, and role-based access controls. HCP Terraform and Terraform Enterprise support Sentinel policies. HashiCorp cautions that policy-as-code is a guardrail, not a security boundary, and trusted providers and modules matter because they can access workspace variables and state. Downloads are available for Windows, macOS, and Linux.