Originally published on DevToolHub .
Choose Terraform when your team wants one declarative language that every cloud engineer already reads. Choose Pulumi when you want loops, tests and secrets handled in a real programming language. The terraform vs pulumi decision matters less for what each tool can build, because both deploy to AWS, Azure and GCP. It matters more for how they store state and survive refactors.
I ran the same resources through both tools to see where they differ. I used OpenTofu 1.13.9 and Pulumi 3.274.1 with Python. Nothing touched a cloud account. I used the random provider, so every resource lives only in state.
What Is the Difference Between Terraform vs Pulumi?
Terraform describes infrastructure in HCL, a configuration language built for this job. Pulumi lets you describe it in Python, TypeScript, JavaScript, Go, .NET or Java. Pulumi's own comparison page lists those languages, plus YAML and HCL.…