AWS CloudFormation vs HCP Terraform: when each one fits
CloudFormation fits a team that deploys only to AWS and wants no added charge for the AWS resource types it manages. The CloudFormation pricing page states there is no additional charge for AWS::* and Alexa::* resource providers or managed hooks in the AWS::* namespace, so you pay only for the underlying resources. HCP Terraform fits a team running Terraform across several clouds or SaaS providers that wants hosted remote state, runs and policy. Its paid tiers bill per managed resource, with Essentials listed at $0.10 per resource per month, and every tier includes remote state storage, remote runs and team management.
The decision turns on four factors. The first is provider scope: if your code touches only AWS, CloudFormation covers it without a second control plane, while a multi-cloud or SaaS footprint points toward a tool that spans providers. The second is where state and plan data may live. CloudFormation is an AWS managed service, and HCP Terraform is hosted by default, so a data residency requirement needs a check of the hosting location and contract terms, which you should confirm with each vendor in writing. The third is tolerance for the Terraform license. Terraform has been under the Business Source License since version 1.6.0, so legal counsel should review whether your intended use is covered. The fourth is operating work. Both hosted options remove the need to run a state backend and a run platform yourself, and a self-hosted alternative moves that work to your team.
Before you choose, run three checks. List every provider and SaaS API your infrastructure code calls today and in the projects planned for the next year. Identify the data that ends up in Terraform state and plan files, since these can hold sensitive attribute values, then ask each vendor where that data is stored and who can read it. Finally, count your managed resources from a current state file, counting entries with mode managed, which is how HashiCorp's pricing defines the unit for its per-resource tiers. If your team has no capacity to operate a backend, a hosted option is the simpler fit. If it does, price a self-hosted route against the hosted cost before you decide.
Which of AWS CloudFormation vs HCP Terraform fits each scenario
This table maps six common scenarios to the option that fits best and the condition that decides it between AWS CloudFormation and HCP Terraform. Read each row by checking the condition first: if it matches your estate, the named option is usually the better starting point. The last row points to the self-hosted route for teams that want hosted-style runs without state and plans leaving their network.
| Scenario | Better fit | Condition that makes it so |
|---|---|---|
| AWS-only estate across many accounts and regions | AWS CloudFormation | Choose it when every resource is AWS and one operation must span accounts and regions. AWS::* providers carry no added charge, per AWS pricing. |
| Resources outside AWS, such as other clouds or SaaS | HCP Terraform or self-hosted OpenTofu | Terraform providers cover many clouds and SaaS tools. Third-party CloudFormation types are billed per handler operation. |
| Team already writes Terraform with pull request review | HCP Terraform | Choose it to keep existing Terraform code and VCS-connected runs. Every tier includes VCS connections and remote runs. |
| Policy as code must gate every plan | HCP Terraform | The enhanced Free tier includes Sentinel and OPA policy as code. Confirm the policy engine your assessors expect. |
| Preference for AWS-managed proactive controls | AWS CloudFormation | They check CloudFormation and CDK deployments before resources change, so Terraform runs are outside them. |
| State and plans must stay in your own network | Terraform Enterprise or self-hosted OpenTofu | CloudFormation and HCP Terraform hold state with AWS or HashiCorp. Terraform Enterprise is self-managed and custom priced, per HashiCorp's pricing page. |
| Remote runs and state on your own servers | Self-hosted OpenTofu with Terrakube or Atlantis | Terrakube handles remote state and runs; Atlantis runs plans from pull requests. Both are Apache 2.0 and support OpenTofu. |
How to decide between the two and when to self-host
The path starts with the estate. If every resource runs in AWS and the team does not need HCL or providers outside AWS, AWS CloudFormation is the direct fit, since it is an AWS managed service. Otherwise, the next check is whether state must stay inside your network. If hosted state is acceptable, HCP Terraform is the hosted option. If state must stay in your network, check the Terraform license. An acceptable license points to Terraform Enterprise, the self-managed edition. An unacceptable license points to the self-hosted OpenTofu route, with Terrakube or Atlantis handling runs and state. Confirm license terms with your legal team before you choose.
Decision path from estate scope to CloudFormation, HCP Terraform, Terraform Enterprise or OpenTofu.
Capabilities of AWS CloudFormation vs HCP Terraform side by side
This table compares the capabilities of AWS CloudFormation and HCP Terraform that matter when you choose an infrastructure as code platform. CloudFormation is an AWS managed service for AWS resources and its registry, so its scope ends there. HCP Terraform is a hosted run, state and registry service that works with Terraform providers, and several features depend on the tier you buy, which the cells mark. Read each row as a checklist, and confirm any cell you rely on against current vendor documentation.
| Capability | AWS CloudFormation | HCP Terraform |
|---|---|---|
| Template or configuration model | Templates describe AWS resources, provisioned and configured together as a stack | Configuration describes resources managed through workspaces that hold state |
| Resource scope | AWS resources and the CloudFormation Registry only | Any resource a Terraform provider exposes, across clouds and SaaS services |
| Version control tracking | Templates can be kept in a version control system to track infrastructure changes | VCS connections included on all tiers, linking workspaces to repositories |
| Reuse across regions and accounts | One template reused across regions; one operation can manage resources across accounts and regions | Reuse through modules and variables; confirm the cross-account pattern you need |
| Access surfaces | Console, API, AWS CLI and AWS SDKs | Web UI, HCP Terraform API and Terraform CLI for remote runs; confirm SDK coverage |
| Policy and proactive checks | AWS-managed proactive controls check CloudFormation and CDK deployments before resources change | Sentinel and OPA policy as code listed on the enhanced Free tier; confirm paid tier coverage |
| Remote state and remote runs | Stack state is kept by the AWS service, not in a file you host | Remote state storage and remote runs included on all tiers |
| Private registry | CloudFormation Registry for AWS and third-party resource types | Private registry on all tiers; Essentials limits test-integrated module publishing to 10 modules |
| Run tasks, cost estimation and SSO | Confirm in AWS documentation; not covered on this page | Run tasks, cost estimation and SSO listed on the enhanced Free tier; confirm for paid tiers |
How each one bills and what the published price pages say
The two products bill on different units. CloudFormation charges for the AWS resources a stack creates, plus a metered fee for third-party and custom extensions, while HCP Terraform charges per managed resource in state on its paid tiers. Read each card against the current published pages, since rates and free allowances change, and confirm them before you build a budget.
AWS resource types carry no charge
CloudFormation applies no additional charge to resource types in the AWS::* and Alexa::* namespaces or to managed hooks in the AWS::* namespace. You pay only for the underlying AWS resources your stacks create, such as compute, storage and networking. Check which resource types your templates use, because any third-party or custom type falls under the next card's billing. CloudFormation is an AWS managed service, so its cost sits inside your AWS account rather than on servers you run. Confirm the current wording on the pricing page.
CloudFormation pricingThird-party and custom handler charges
Third-party and custom resource types and hooks are billed per handler operation, after a monthly free allowance per account. Handler duration beyond 30 seconds adds a separate per-second charge, so a slow custom handler, such as one waiting on an external API, can cost more than its call count suggests. Count the handler operations each deployment triggers across accounts and regions before you rely on a registry extension in production. Confirm the current rates and allowance on the CloudFormation pricing page.
Essentials, Standard and Premium tiers
HCP Terraform bills each paid tier per managed resource per month, so the invoice grows with the number of resources in your state files. All tiers include remote state storage, VCS connections, remote runs, a private registry and team management. Essentials limits test-integrated module publishing to 10 modules, while Standard and Premium add unlimited module publishing, change requests and no-code provisioning, so module and workflow needs should drive the tier choice. Confirm current rates and feature lists on the HashiCorp pricing page.
HashiCorp pricingEnhanced Free tier allowance
The enhanced Free tier includes unlimited users, SSO, Sentinel and OPA policy as code, run tasks, HCP Terraform agents and cost estimation. A managed resource is one in a state file with mode set to managed, counted from its first plan or apply, and null resources are excluded. The legacy Free plan reached end of life on March 31, 2026, and remaining organizations were moved to this tier automatically, so count your resources against this rule before you assume the allowance covers you. Confirm the current limits in HashiCorp's blog post.
HashiCorp blogCustom pricing for self-managed editions
Terraform Enterprise, the self-managed edition, and HCP Terraform Europe are priced on request, so you need a written quote before you can compare them with the tiers above. Terraform Enterprise runs on Docker, Kubernetes, OpenShift, Nomad or Podman on AMD or ARM architectures as of version 1.0.0, so ask whether the quote covers the hosting, upgrades and support you will run yourself. Ask for the pricing basis, support terms and region and data location terms for HCP Terraform Europe in writing. Check the custom pricing entries on the HashiCorp pricing page before you request a quote.
Terraform Enterprise deploymentWhat drives the bill up or down for each option
For AWS CloudFormation, the bill has two parts. The first is the AWS resources your templates create, which are billed by their own services. The second is handler operations for third-party and custom resource types and hooks. AWS states there is no additional charge for AWS::* and Alexa::* resource providers or managed hooks in the AWS::* namespace. Third-party and custom types cost $0.0009 per handler operation after a free tier of 1,000 per month per account, plus $0.00008 per second of handler duration beyond 30 seconds, according to the CloudFormation pricing page. The drivers are how many third-party types and custom hooks your pipelines call, how many accounts and regions run the same stacks, and how long those handlers run. Pull a recent month of billing data and count handler operations per account before comparing totals, because the resource charges stay the same whichever tool deploys them.
For HCP Terraform, the bill is per managed resource. HashiCorp counts a managed resource as one in a state file with mode set to managed, counted from its first plan or apply, with null resources excluded. The HashiCorp pricing page lists Essentials at $0.10 per resource per month, Standard at $0.47 and Premium at $0.99, while Terraform Enterprise and HCP Terraform Europe are custom priced (HashiCorp pricing). Every paid tier includes remote state, VCS connections, remote runs and a private registry. Essentials caps test-integrated module publishing at 10 modules, while Standard and Premium add unlimited publishing, module deprecation, team notifications, change requests, no-code provisioning and HCP Waypoint. The drivers are the managed resource count across all workspaces and whether your teams need the Standard or Premium features. Count managed resources per workspace from current state files to size the tier before you buy.
A self-hosted replacement moves cost into categories you already budget for. These are hosting for the OpenTofu runner and Terrakube or Atlantis, storage for state and plan files, backups of state, identity integration with your single sign-on, and staff time and support for upgrades and incidents. OpenTofu is licensed under MPL-2.0 and Terrakube and Atlantis are licensed under Apache 2.0, so the license line is zero, but the operating line is not. When you request a quote from any implementation partner or vendor, ask for four things in writing: the resource count included, the features included in each tier, the support scope and response expectations, and who performs upgrades and security patches. Confirm each answer against your own environment before comparing totals.
Where state, plans and templates live and how you get them out
Each option keeps a different part of your infrastructure record: templates, state, run history and policies. The exit question is the same for each: which copies you hold, and in what format. Confirm the export path for every item in your own accounts before you rely on it.
CloudFormation stacks in AWS
CloudFormation is an AWS managed service for AWS resources and the CloudFormation Registry, and it is not self-hosted. Your templates can sit in version control, which records what changed in your infrastructure over time. The stacks that CloudFormation provisions and tracks are held by AWS, so stack state and event history are reachable through the console, API, AWS CLI and SDKs that AWS provides. Confirm how far back you can query stack events and what you can export from your own accounts before you depend on them.
AWS CloudFormation docsHCP Terraform hosted state and runs
HCP Terraform keeps each workspace's state, remote runs, variables, VCS connections and private registry on HashiCorp's hosted service. State leaves the platform through the state versions API, where GET /workspaces/:workspace_id/current-state-version returns a raw state download URL and, for states created by Terraform 1.3 or later, a JSON state download URL. Test that download on a non-production workspace before any migration, since it is the path your state takes out of the platform.
Terraform Enterprise self-managed
Terraform Enterprise is the self-managed edition, priced on request, and it moves state, runs and policy into infrastructure you operate. As of version 1.0.0 it runs on Docker, Kubernetes, OpenShift, Nomad or Podman, on AMD or ARM architectures. Check that your platform team supports the chosen runtime and architecture, and who patches the platform and its database. Self-management shifts upgrades, backups and availability work to your team, so price that effort alongside the license.
Terraform Enterprise deploymentLock-in and exit paths
Lock-in sits in four places: CloudFormation templates use AWS-specific formats, HCP Terraform configurations use HCL, and workspace settings, policy checks and VCS links live inside the platform. Policies written in Sentinel or OPA, and the mapping from each workspace to its repository and variables, must be exported or rebuilt by hand. Inventory each of these items in your own environment and confirm its export path before a renewal or migration decision.
When neither product fits and a self-hosted OpenTofu route does
Choose the self-hosted route when a hard constraint decides the question. If state and plan data must stay inside your own AWS accounts or an air-gapped network, a hosted run service is out of bounds whatever its feature list. The same holds when your estate spans several clouds or on-premises systems, because CloudFormation is built around AWS resources and a mixed estate usually needs a second tool. Licensing is the third trigger. HashiCorp announced on August 10, 2023 that future releases would move to the Business Source License, and Terraform has been under it since version 1.6.0. OpenTofu, an MPL-2.0 fork under the Linux Foundation, was accepted to the CNCF Sandbox on April 23, 2025 (CNCF project page).
The route has two parts: the OpenTofu CLI as the IaC engine, and a run and state layer. Terrakube provides a remote backend and supports the cloud block, so it fits teams that want a hosted-style workflow on infrastructure they run. Atlantis fits better when your review process centers on pull requests, because it runs plans and applies from comments on the pull request. Both are licensed under Apache 2.0 and document OpenTofu as well as Terraform, but confirm which OpenTofu versions each project supports before you choose. For state, enable client-side encryption of state and plan files with a key provider such as AWS KMS, GCP KMS or OpenBao, so the data is encrypted before it reaches your storage (OpenTofu state and plan encryption docs). Test a restore with decryption during your drills, because a lost key leaves state unreadable.
The running effort is the part a renewal comparison often leaves out. Someone owns the hosting for Terrakube or Atlantis, the SSO integration, audit logging of runs and state access, backups of the run database and state storage, and upgrades for both the OpenTofu CLI and the runner image. Runner credential scoping matters most: give each workspace or environment its own IAM role with only the permissions its stack needs, and keep long-lived keys out of the runner. CloudFormation's AWS-managed proactive controls check deployments before resources change, so confirm which policy-as-code tool, such as OPA or Checkov, would fill that role in your pipeline and whether your auditors accept its output as evidence. Treat that equivalent as an open item to verify before you commit to a move.
What a move between the two products involves
A move from AWS CloudFormation to self-hosted OpenTofu runs as seven ordered steps, from inventory to decommissioning. Each step produces a record your security, compliance and platform teams can review. The sequence ends with the old stacks retired and the evidence kept for audit.
Inventory stacks and workspaces
List every CloudFormation stack across accounts and regions, and every HCP Terraform workspace in the organization. For each one, record the providers, the resource count, the owning team and the pipeline that applies it. The platform owner needs read access to CloudFormation in each account, and an HCP Terraform owner or team member with workspace read rights. Take HCP Terraform counts from state, since HashiCorp counts only managed resources in each state file, with null resources excluded. The step is done when the platform owner signs off the inventory and each stack has a named owner.
Choose the target and request a quote
Decide between OpenTofu with Terrakube, which provides a remote state and run platform, and OpenTofu with Atlantis, which runs plans from pull requests. Choose the CLI deliberately: Terraform has been under the Business Source License since version 1.6.0. Check which Terraform and OpenTofu versions your modules need, and where state and plan files will be stored. Ask for a fixed-scope quote in writing, separating the one-time migration work from any recurring support or retainer. Procurement and the security owner approve the scope before work starts. The step is done when the target design and the signed scope are on file.
Export state from both platforms
For HCP Terraform, read each workspace's current state through the state versions API, using
GET /workspaces/:workspace_id/current-state-versionand the hosted JSON state download URL for states created by Terraform 1.3 or later. Use a token that belongs to a workspace owner, and store the downloads in an encrypted location with access logging. CloudFormation keeps stack state inside the AWS service, so its export route differs and must be confirmed in a test account first. The step is done when every workspace state is saved with a recorded checksum and each stack has a confirmed import method.Translate templates and policies
Convert CloudFormation templates, including any AWS CDK output, into HCL, and map each parameter to a Terraform variable. Recreate HCP Terraform policy checks, whether written in Sentinel or OPA, as checks that run in your pipeline, and map AWS proactive control findings to the same gates. IaC engineers do the conversion, which is partly manual and needs line-by-line review. Security signs off on policy coverage. The step is done when the code plans cleanly in a test account and each policy has either a replacement or a documented gap.
Pilot and compare plans
Run the translated code against a non-production account and compare its plan with the change set or plan the current pipeline produces for the same stack. Investigate each difference in resource names, properties and replacements before accepting it. Your platform team provides the pilot account, and the application owner approves any expected change. Keep the comparison as evidence for the change record. The step is done when every difference is explained, accepted in writing, and no resource is scheduled for replacement without an approval.
Cut over one stack at a time
Move one stack per change window, starting with the lowest-risk stack that has no shared dependencies. The change advisory board sets each window and approves the plan, the rollback steps and the saved state and template. Keep the CloudFormation stack in place until the new plan shows no changes and the workload owner has verified the service. If the cutover fails, restore the saved template and state, then reapply through the existing pipeline. The step is done when the stack shows a clean plan on the new platform and the change ticket records the result.
Decommission and keep evidence
Confirm how deleting each CloudFormation stack treats its resources before removing anything, since a stack delete can also remove the resources it manages. Retire the stacks, revoke the old tokens and remove leftover pipelines and access. Archive the inventory, plan comparisons, change records, export logs and access reviews where auditors can reach them. The compliance lead sets retention and confirms the evidence list with the independent auditor. The step is done when the old stacks are retired, the tokens are revoked and the compliance lead has reviewed the archive.
Questions buyers ask before choosing or moving
Which is cheaper, AWS CloudFormation or HCP Terraform, and what drives the difference?
For AWS resource types, CloudFormation adds no separate charge, so the cost difference comes down to how each option bills for tooling. CloudFormation has no additional charge for AWS::* and Alexa::* resource providers or managed hooks in the AWS::* namespace, and you pay only for the underlying resources. HCP Terraform bills paid tiers per managed resource per month: $0.10 for Essentials, $0.47 for Standard and $0.99 for Premium, according to the HashiCorp pricing page. That charge grows with the number of managed resources. A self-hosted OpenTofu stack removes the per-resource vendor line but adds compute, storage, backups, upgrades and engineer time. Ask any quote to price those components separately and to state the tier, resource count and assumptions it uses.
Do we need Terraform Enterprise to self-host HCP Terraform?
No. Terraform Enterprise is HashiCorp's self-managed edition, sold at custom pricing, and it is one option among several. As of version 1.0.0, it runs on Docker, Kubernetes, OpenShift, Nomad or Podman on AMD or ARM architectures, according to HashiCorp's deployment documentation. The open-source route replaces it with two parts: the OpenTofu CLI for plans and applies, plus either Terrakube for remote runs, state and the cloud block, or Atlantis for plans driven from pull requests. Terrakube and Atlantis are both Apache 2.0 licensed, and both document running OpenTofu. Choose between them based on whether your team wants a web-based run and state platform or pull request automation. CloudFormation has no self-hosted form, since it is an AWS managed service.
Can our team move from CloudFormation without outside help?
It can, if your engineers already write HCL, you have a complete inventory of stacks and you can run old and new side by side during cutover. Most of the work is translation and verification: you map each stack's resources, decide which live resources to import into state, and rebuild the review and deployment steps that CloudFormation change sets and the AWS console handled before. Gaps usually appear where a team relied on a CloudFormation feature with no direct equivalent, so test those early. Outside help is most useful for the inventory, the import plan and the cutover runbook. DeployOpen plans, implements and documents self-hosted platforms in your own infrastructure under a fixed scope agreed in writing before work starts, so you can decide which parts to keep in-house.
How long does a move from CloudFormation take, and what sets the length?
The length depends mainly on how large and interconnected the estate is. Four drivers set it:
- The number of stacks, nested stacks and cross-stack references that must map to modules or workspaces.
- How many live resources must be imported into state, and how many can be recreated safely.
- How many pipelines, approval steps and access rules have to be rebuilt.
- How long a parallel run and a cutover window must last to satisfy your change process.
Ask for the timeline in the written scope, tied to those counts and to the milestones your change board must approve. A quote that does not list these counts gives you no basis for comparing it with another proposal.
Does the HCP Terraform free tier cover our estate, and how are resources counted?
The enhanced Free tier includes up to 500 managed resources with unlimited users, so it fits an estate only if your managed resource count stays within that limit. HashiCorp announced that the legacy Free plan reached end of life on March 31, 2026, and that remaining organizations were moved automatically to the enhanced tier, according to its December 2025 blog post. HashiCorp counts a managed resource as one in a state file with mode set to managed, from its first plan or apply, and excludes null resources. Count from your state files before you rely on the tier, because that is the count HashiCorp applies. CloudFormation bills differently: it adds no charge for AWS resource providers, but third-party and custom resource types and hooks cost $0.0009 per handler operation after 1,000 free handler operations per month per account.
Does the Terraform license change affect whether we choose OpenTofu or HCP Terraform?
Yes, it changes the license terms you accept, so have counsel review them before you commit. On August 10, 2023, HashiCorp announced that future releases would move from the Mozilla Public License 2.0 to the Business Source License 1.1, with the main restriction aimed at vendors offering competitive services, as described in its licensing blog post. Terraform has been under that license since version 1.6.0. OpenTofu is an MPL-2.0 fork under the Linux Foundation, and it was accepted to the CNCF Sandbox on April 23, 2025. IBM completed its acquisition of HashiCorp on February 27, 2025. Whether the restriction applies to your use is a question for counsel to answer, and the answer should be written into your decision record.
How DeployOpen helps you choose, implement or integrate
DeployOpen approaches this comparison by planning and implementing the self-hosted side: OpenTofu as the CLI with Terrakube or Atlantis for runs and state, inside your own cloud accounts or data centers. The written scope comes first, so the choice between staying on AWS CloudFormation and moving to a self-hosted pipeline is made against your accounts, state handling and approval flow.
How we scope
- We confirm which AWS accounts, regions and workspaces the written scope covers before any work starts.
- The scope lists which CloudFormation stacks or HCP Terraform workspaces move, and which stay as they are.
- Fixed-scope engagements set deliverables and timelines in writing, and ongoing support can run as a retainer.
How we build
- We build OpenTofu as the CLI, with Terrakube or Atlantis chosen in scope for remote runs and state.
- We configure state and plan encryption with a key provider such as AWS KMS, where scope requires it.
- We security test the new pipeline, covering run permissions, state access and credential handling before cutover.
How we hand over
- We document the module layout, workspace map, variable sources and run approvals so your team can operate it.
- We provide a state migration runbook covering how state leaves HCP Terraform through its state versions API.
- Handover includes compliance evidence for access control, audit logging and backups, prepared for your independent auditors to review.
How we support
- We back up the state store and upgrade OpenTofu, Terrakube or Atlantis under the agreed written scope.
- Retainers cover ongoing support, upgrades and continuous security testing of the pipeline after go-live.
- Ask for the retainer terms, response expectations and upgrade process in writing before you sign.

