All articles
DevOps & CloudNovember 22, 2026 7 min read

Pulumi vs Terraform in 2026: A Migration Postmortem

We moved a mid-sized AWS estate from Terraform to Pulumi, then moved part of it back. Here's what the migration actually cost, where Pulumi earned its keep, and where HCL still wins.

We spent most of last year migrating a client's AWS estate — roughly 180 resources across three accounts — from Terraform to Pulumi. Then we moved about a third of it back. This isn't a vendor pitch either way; it's what we learned about where each tool actually earns its keep in 2026.

Why we migrated in the first place

The starting point was a Terraform codebase that had grown organically for about four years. HCL modules, a Terragrunt wrapper for environment composition, remote state in S3 with DynamoDB locking, and a CI pipeline that ran terraform plan on every PR. It worked. The team disliked it.

The specific complaints were consistent across three engineers:

  • Conditional logic in HCL had turned into a count = var.enabled ? 1 : 0 festival, with resource references guarded by try() everywhere.
  • Shared logic between modules was either copy-pasted or forced through awkward locals gymnastics.
  • Testing was essentially terraform plan plus hope. terratest existed but nobody wanted to write Go to test infrastructure.

Pulumi's pitch — real programming languages, proper unit tests, and the same underlying provider model — landed well. We picked TypeScript because the application teams already lived there.

What we expected to gain

Before starting we wrote down the hypotheses we wanted to test:

  1. Shared abstractions (VPC patterns, tagging, IAM boundary policies) would be cleaner as classes than as modules.
  2. Unit tests with @pulumi/pulumi/testing would catch policy violations before plan time.
  3. Onboarding application engineers to infra work would get easier because the syntax wasn't foreign.

Two of those turned out to be true. The third did not, and that's where it gets interesting.

The migration itself

We used pulumi import for the bulk of the work. The workflow looked roughly like this for each stack:

# Generate import blocks from a Terraform state dump
pulumi import --from terraform ./terraform.tfstate \
  --out imported.ts \
  --protect

# Review, rename, restructure
# Then run against a scratch stack first
pulumi preview --stack scratch-import

The --protect flag matters. Early on we imported a production RDS cluster without it, then refactored the resource name in code. Pulumi happily planned a replacement. We caught it in review, but it was a close call.

The things that went well

Pulumi's ComponentResource pattern genuinely is nicer than Terraform modules for anything with real logic. A VPC component that encodes our opinions about subnet layout, flow logs, and VPC endpoints ended up about 40% shorter than the equivalent Terraform module, and we could unit-test it:

import * as pulumi from "@pulumi/pulumi";
import "mocha";
import { expect } from "chai";

pulumi.runtime.setMocks({
  newResource: (args) => ({
    id: `${args.name}-id`,
    state: args.inputs,
  }),
  call: (args) => args.inputs,
});

describe("StandardVpc", () => {
  it("enables flow logs by default", async () => {
    const { StandardVpc } = await import("./vpc");
    const vpc = new StandardVpc("test", { cidr: "10.0.0.0/16" });
    const flowLogsEnabled = await new Promise((resolve) => {
      vpc.flowLog.apply((fl) => resolve(fl !== undefined));
    });
    expect(flowLogsEnabled).to.equal(true);
  });
});

That test runs in about 200ms. The equivalent terratest run that actually spun up a VPC took closer to four minutes and cost real money. For the handful of invariants we actually care about — tagging policy, encryption defaults, public access flags — unit tests were a clear win.

Secrets handling with Pulumi's native encrypted config was also noticeably less painful than juggling SOPS files or SSM lookups in Terraform.

Where it got expensive

The mistake we made was assuming that "real programming language" would translate to "easier for everyone". It didn't.

The async model is not free

Pulumi's Output<T> type is correct — resource outputs are promises, they can't be unwrapped synchronously — but it means every piece of string interpolation becomes an apply or a pulumi.interpolate. Engineers who hadn't internalised that would write code like this:

// This does not do what you think
const policy = {
  Resource: `${bucket.arn}/*`,
};

The resulting policy contained the literal string Calling [toString] on an [Output<T>].... Pulumi warns about it, but the warning scrolls past in CI and the bad policy gets applied. We saw this three times in the first two months, once in production.

In Terraform, "${aws_s3_bucket.foo.arn}/*" just works. The HCL model is less expressive, but it's less sharp.

Diffs got harder to read

terraform plan output is ugly but every engineer we work with can skim it. pulumi preview output, especially for component resources with nested children, took longer for reviewers to parse. We ended up writing a custom diff summariser for CI because PR reviewers were rubber-stamping changes they didn't fully understand.

Provider parity is close but not identical

Pulumi's AWS Classic provider wraps the Terraform AWS provider, so coverage is near-complete. But the AWS Native provider — which Pulumi nudges you toward for newer services — lagged behind on a few resources we needed, specifically around EventBridge Pipes and some Verified Access configurations. We ended up with a mix of Classic and Native resources in the same stack, which is supported but adds cognitive overhead.

What we moved back to Terraform

After about eight months, we moved the networking and IAM baseline stacks back to Terraform. The reasoning:

  • Those stacks change rarely (maybe once a quarter).
  • They're reviewed by security, who are more comfortable with HCL.
  • The expressiveness we gained from TypeScript wasn't buying us much in code that's mostly declarative resource definitions with few conditionals.

Application-adjacent infrastructure — per-service stacks that deploy Lambda functions, Step Functions, EventBridge rules, and the IAM to glue them together — stayed on Pulumi. That's where the programming-language benefits actually compound, because the infra code lives next to the application code and the same engineers own both.

The rough split we landed on

LayerToolWhy
Accounts, Organizations, SCPsTerraformRarely changes, security team owns it
VPCs, Transit Gateway, baseline IAMTerraformStable, declarative, reviewed by security
Shared platform (EKS, databases)PulumiBenefits from component abstractions
Per-service infraPulumiLives with application code, same engineers

This isn't a universal recommendation. It's what fit this team.

The numbers, roughly

We don't want to publish precise figures that would identify the client, but as rough orders of magnitude from our tracking:

  • Migration took about 11 weeks of elapsed calendar time with one engineer at ~60% allocation, plus review from two others.
  • Plan/preview times got slightly worse on Pulumi (TypeScript compilation adds a few seconds per run) but not meaningfully so.
  • CI minutes went up roughly 15% because of Node dependency installs; mitigated with aggressive caching.
  • Post-migration incident count related to IaC changes stayed flat. We didn't make things more reliable; we made them more pleasant to work on where it mattered, and more dangerous where it didn't.

Decision heuristics we'd use now

If a team asked us today whether to pick Pulumi or Terraform for a new AWS estate, we'd ask four questions:

  1. Who maintains the IaC? If it's a dedicated platform team, Terraform's lower ceiling is usually fine and the tooling ecosystem is deeper. If it's application engineers writing their own infra, Pulumi pays off.
  2. How much real logic lives in your infra? Lots of conditionals, loops over complex inputs, shared abstractions — Pulumi. Mostly flat resource definitions — Terraform.
  3. Does your security team review infra PRs? If yes, their comfort with HCL is a real cost to weigh.
  4. Do you need testing beyond plan? Pulumi's unit test story is genuinely better. Terraform's integration testing via terratest works but is slower and more expensive.

Neither tool is winning the IaC war in 2026. OpenTofu is a reasonable third option we didn't evaluate here but which removes the licensing friction that pushed some teams to Pulumi in the first place.

Where we'd start

If you're on Terraform today and tempted to migrate: don't move the whole estate. Pick one or two stacks where you're actually feeling pain — usually the ones with the most conditional logic or the most frequent changes — and port those first. Live with the mixed world for a quarter. If the Pulumi stacks feel better and the handoff between tools isn't annoying, expand. If not, you've only spent a few weeks finding out, not a year.

And whichever tool you pick, invest in the diff-review workflow before you invest in anything else. The tool that your reviewers can read is the tool that will catch the production-breaking change.

#Pulumi#Terraform#AWS#IaC#DevOps

Want a team like ours?

72Technologies builds production software for the kind of teams who actually read this blog.

Start a project