You're starting a project from scratch and can choose the infrastructure-as-code tool. In what situations would Pulumi be a better choice than Terraform or OpenTofu? Pulumi can use general-purpose languages, which makes complex conditions, loops, reusable abstractions, and environment-specific logic easier to express. It may also be more approachable for application developers than HCL, and could let you define higher-level constructs such as a parameterized test environment instead of assembling many separate modules. Where have these advantages made a meaningful difference, and what trade-offs should be considered?
5 Answers
The strongest Pulumi case is a greenfield startup or platform team where developers and infrastructure engineers already work in one language and want infrastructure components tested and versioned like normal software. It can also be useful for tenant or environment provisioning where each deployment has different options and needs orchestration beyond simply declaring resources. If the organization needs a broadly accessible platform for many teams, Terraform or OpenTofu is usually easier to standardize.
Pulumi makes the most sense when the people maintaining the infrastructure are already experienced software developers and are comfortable enforcing strong code-review, testing, and style standards. Real programming languages are much better for generating many similar environments, handling complicated configuration, building reusable components, or integrating provisioning into an existing application repository and toolchain. The downside is that those same freedoms can produce abstractions and imperative logic that only the original authors understand.
My rule of thumb is Terraform or OpenTofu for the ordinary 90–95% of infrastructure, especially across a large organization or a mixed-skill team. I’d choose Pulumi when the team has a strong programming background and the infrastructure genuinely requires substantial computation, reusable software components, or integration with application code. If the complexity can be handled with a few modules and input variables, the more boring declarative approach is usually the better long-term decision.
For most teams, Terraform or OpenTofu is the safer default. HCL is intentionally limited, which keeps configurations more predictable, plans easier to review, and styles more consistent across teams. That simplicity also makes it easier to hire people, hand over ownership, and debug an incident years later. Pulumi is worth considering when HCL is creating substantial complexity rather than just mild inconvenience.
Don’t choose based only on whether loops and conditionals are available. First check provider coverage, state management, policy and security controls, testing, import and recovery workflows, CI/CD integration, and the availability of maintainers. A general-purpose language can reduce code dramatically, but it can also hide what will change in production. Whichever tool you pick, keep abstractions small, document the conventions, and make the generated plan or preview easy to review.

I’ve seen this go well with a small, stable team that all knew the same language and intended to own the system long term. In less experienced or frequently changing teams, every stack can become a different custom snowflake.