The choice that outlives the project
A three-person team provisions 800 cloud resources: virtual machines, databases, load balancers, DNS records, IAM roles. The first month, all three tools do the job. The twelfth month, the choice shows up in three places at once: the monthly bill, the morning the state file corrupts, and the job posting that takes six weeks to fill because it demands a language nobody on the team writes.
This playbook compares the three tools on those three axes, with reproducible cost math at 500, 1,000, and 5,000 managed resources, drawn from the vendors' own pricing pages read on 2026-11-21. The Terraform versus Pulumi versus AWS CDK pricing guide prices the same two tools against a cloud-native third option; this guide answers the different question of which tool model to adopt — declarative, procedural, or general-purpose — and what each model costs to operate.
Three tools, three languages
Terraform speaks HCL, the HashiCorp Configuration Language: a declarative language where you write the end state you want and the tool works out the steps. A resource block says "there is a virtual machine of this size in this region," and Terraform creates it, or changes it, or destroys it to match. HCL is small on purpose — no loops beyond count and for_each, no functions beyond the built-ins — which makes it easy to read and hard to write complex logic in.
Ansible speaks YAML playbooks: a procedural language where you write the steps in order. A play targets a group of hosts, and each task calls a module — yum, template, service — that performs one action. The playbook runs top to bottom, task by task, host by host. Ansible's own documentation puts it plainly: playbooks provide "a repeatable, reusable, simple configuration management and multimachine deployment system," expressed in YAML "with a minimum of syntax."
Pulumi speaks a general-purpose language: TypeScript, Python, Go, C#, Java, or YAML. The infrastructure is ordinary code, so loops, conditionals, functions, classes, and unit tests all work the way they work everywhere else in your codebase. A Pulumi program that provisions ten identical databases is a for loop, not ten copied blocks.
| Dimension | Terraform (HCL) | Ansible (YAML) | Pulumi (TypeScript / Python / Go / C# / Java) | Authority |
|---|---|---|---|---|
| Model | Declarative end state | Procedural ordered steps | Declarative end state, written in code | Vendor documentation, all three |
| Abstraction | count / for_each, modules | Roles, includes, loops | Loops, functions, classes, packages | Vendor documentation, all three |
| Testing | terraform plan, terratest | --check mode, ansible-lint, Molecule | Unit tests in the host language | docs.ansible.com; HashiCorp docs; Pulumi docs |
| Agent | None on the target | Agentless over SSH / WinRM | None on the target | docs.ansible.com; HashiCorp docs |
| Learning curve | Days for HCL basics | Hours for YAML basics | Zero for a developer who knows the language | Editorial analysis of the three docs |
| Hiring pool | Largest of the three | Large in operations teams | Smallest, but any developer qualifies | Editorial analysis, 2026-11-21 |
State: the file that remembers
Every declarative tool needs memory. Terraform keeps it in a state file — a JSON document mapping each resource in your configuration to the real resource in the cloud. Without state, Terraform cannot tell a resource it created from one that already exists. The state file is the single most important file in a Terraform estate, and the first operational decision is where it lives: a remote backend with locking and versioning, such as HCP Terraform or an S3 bucket with locking, from day one. A state file on a laptop is a data-loss incident waiting for a hardware failure.
Pulumi keeps its state in Pulumi Cloud by default, or in a self-managed backend — an S3 bucket, an Azure Blob container, a Google Cloud Storage bucket, or the local filesystem. The free Individual tier includes state management in Pulumi Cloud for one user, which is why solo developers rarely think about state until they add a second teammate. The self-managed backend is the escape hatch: the state is yours, in your bucket, and Pulumi Cloud becomes optional.
Ansible keeps no state. That is its defining architectural difference. A playbook does not remember what it did last time; it re-asserts the desired configuration on every run. Most Ansible modules are idempotent — they check whether the desired final state has already been achieved and exit without performing any actions if it has. The documentation states it directly: "Whether you run a playbook once or multiple times, the outcome should be the same." The cost of statelessness is that Ansible cannot tell you what changed in the cloud outside its runs, and it cannot plan a destroy of everything it manages. The benefit is that there is no state file to corrupt, lock, or lose.
The money: reproducible cost math
The three tools meter different things. HCP Terraform meters managed resources, billed hourly on the peak count in each hour. Pulumi Cloud meters managed resources too, but inside a flat monthly subscription with an included allowance. Ansible-core meters nothing — the license is free, and the cost is the control node and your time.
HCP Terraform's published tiers, corroborated across independent November 2026 reads of HashiCorp's pricing page (the page itself renders client-side): Free covers up to 500 managed resources; Essentials is $0.10 per resource per month ($0.00013 per hour); Standard is $0.47 per resource per month ($0.00064 per hour); Premium is $0.99 per resource per month ($0.00135 per hour). Concurrent runs rise with the tier: 1 for Free, 3 for Essentials, 10 for Standard, 200 for Premium.
Pulumi Cloud's published tiers, read directly from pulumi.com/pricing on 2026-11-21: Free is $0 for one user with state management and 500 workflow minutes; Essentials is $40 per month for unlimited users, including 40 credits and up to 500 managed resources, with each additional managed resource at $0.00025 per hour ($0.1825 per month); Pro is $400 per month with managed resources from $0.0005 per hour ($0.365 per month); Enterprise is custom pricing. Delivery pipelines are $20 per pipeline per month with the first free.
The monthly cost at a given resource count R, on the paid tiers, is:
| Managed resources | HCP Terraform Standard | Pulumi Cloud Essentials | Ansible-core license | Authority |
|---|---|---|---|---|
| 500 | $0 (Free tier) | $40/mo | $0 | HashiCorp pricing; Pulumi pricing |
| 1,000 | $470/mo ($5,640/yr) | $131.25/mo ($1,575/yr) | $0 | $0.47 × 1,000; $40 + 500 × $0.1825 |
| 5,000 | $2,350/mo ($28,200/yr) | $861.25/mo ($10,335/yr) | $0 | $0.47 × 5,000; $40 + 4,500 × $0.1825 |
| 5,000 (top tier) | $4,950/mo Premium | $2,042.50/mo Pro | $0 | $0.99 × 5,000; $400 + 4,500 × $0.365 |
Three facts fall out of the table. First, Pulumi Essentials is cheaper than HCP Standard at every scale above 500 resources, because the per-resource rate is lower and the first 500 are included. Second, Ansible's license cost is zero at every scale — its cost is operational: the control node, the time to write and maintain playbooks, and the absence of a hosted state service. Third, the free tiers are real but capped: HCP Terraform Free stops at 500 resources, and Pulumi Free stops at one user. A team of two running 600 resources pays on both platforms from the first month. Run the same arithmetic through the ROI calculator to annualise the saving against the migration cost before switching tools for price alone.
Drift, policy, and secrets
Drift is the gap between what the code says and what the cloud actually contains — a console edit, a manual scaling change, a support ticket that resized a database. Terraform refreshes state before every operation, so every terraform plan shows the drift in its diff, on every tier; scheduled drift detection inside HCP Terraform is a Standard-and-above feature. Pulumi is the opposite by design: it does not refresh state before every operation, because querying every resource would add latency on large stacks — instead it compares the recorded state with the program, and scheduled drift detection with optional remediation is a Pulumi Cloud Pro feature. Ansible detects drift differently: it does not track cloud state, so you run a playbook in check mode — ansible-playbook --check — which reports the changes it would make without applying them. Check mode is the Ansible answer to a plan, and it is free.
Policy follows the same tiering. Terraform's policy enforcement (Sentinel) and cost estimation arrive on Standard; Pulumi's organization-managed policy enforcement and preventative policies arrive on Pro, with advisory-only results on Essentials; Ansible's policy is ansible-lint and code review, which cost nothing but require discipline. Secrets follow the same pattern: Terraform leans on Vault or the cloud secret store; Pulumi has its own encrypted secrets and ESC, with on-demand secrets at $0.50 per secret per month on Essentials; Ansible has Ansible Vault, which encrypts variables inside the repository at no extra cost.
The decision matrix
| Your situation | Pick | Why | Authority |
|---|---|---|---|
| Team writes TypeScript / Python / Go | Pulumi | Zero new language; unit tests in the host language; cheapest paid tier above 500 resources | Pulumi pricing; editorial analysis |
| Team is operations-led, hiring for cloud skills | Terraform | Largest hiring pool; HCL is the default IaC skill; widest provider coverage | HashiCorp pricing; editorial analysis |
| Job is configuring machines you already own | Ansible | Agentless, YAML, idempotent, no state file, no per-resource meter | docs.ansible.com |
| Estate under 500 resources, one engineer | Any Free tier | HCP Free or Pulumi Free both cost $0; decide on language, not price | HashiCorp pricing; Pulumi pricing |
| Regulated, audit logs required | HCP Premium or Pulumi Pro | Audit logging is a paid-tier feature on both; do not improvise it | HashiCorp pricing; Pulumi pricing |
| Multi-cloud with one codebase | Terraform or Pulumi | Both are cloud-agnostic; Ansible is strongest inside the machine, not across clouds | Vendor documentation, all three |
Who should NOT use each tool
Terraform is the wrong pick when the team has no one who will own the state file. If state lives on a laptop, or if nobody understands locking, the first concurrent apply will corrupt it, and the recovery is manual. Do not adopt Terraform as a solo side project with state on disk and no backend — use Pulumi Free, where the state is hosted for you.
Ansible is the wrong pick when the estate is mostly cloud-native resources that are created and destroyed daily. Ansible configures machines; it does not plan a destroy of 800 cloud resources, and it has no graph of dependencies between a VPC, a subnet, and a database. Provisioning that estate in Ansible means writing the dependency ordering by hand, in YAML, and maintaining it forever.
Pulumi is the wrong pick when the team cannot agree on one language. Pulumi's strength is that the infrastructure is code in a language the team knows; if half the team writes TypeScript and half writes Python, the estate splits into two codebases with two skill silos. Pick one language for the whole estate and enforce it in review, or pick Terraform's single HCL instead.
The adoption checklist
- [x] Language chosen — the team writes it already; no new language for this project.
- [x] State backend live — remote, locked, versioned, restore tested, before the first resource.
- [x] Paid tier priced — the cost at 500, 1,000, and 5,000 resources is in the budget, not discovered on an invoice.
- [x] Drift run scheduled — a weekly plan or check-mode run, with the diff reviewed, not just run.
- [x] Secrets out of the repository — Vault, ESC, or Ansible Vault; no plaintext secret has ever been committed.
- [x] Destroy tested in staging — the tool can tear down everything it built, and someone has watched it do so.
Three mistakes that cost an estate
- State on a laptop. Adopting Terraform with state on a laptop: the second apply from a second machine creates a split-brain state, and the merge is manual.
- Provisioning cloud in Ansible. Provisioning cloud resources in Ansible: the playbook grows into a hand-maintained dependency graph, and the first destroy is a week of manual console deletions.
- Choosing on price alone. Choosing on price alone and ignoring the hiring row: the cheapest tool per resource is expensive if it takes six weeks to hire someone who can operate it.
The Docker versus Kubernetes versus Amazon ECS pricing guide prices the infrastructure the pipelines deploy into, and the OpenTofu migration playbook covers the exit if the license terms ever change your calculus.
Founder & CEO Insight — Enow A. Jovial
