Explain Terraform vs Pulumi.

Terraform vs Pulumi compares two Infrastructure-as-Code (IaC) tools—Terraform uses a declarative language (HCL), while Pulumi leverages general-purpose languages like TypeScript, Python, Go, and C# to provision and manage cloud resources.

When to Use

  • Terraform: Multi-cloud standardization, large teams, and mature module/registry workflows.
  • Pulumi: Teams wanting to reuse business logic, write unit tests, and manage infra directly in real programming languages.

Example

  • Terraform: Write HCL to define an AWS S3 bucket, run terraform plan → apply.
  • Pulumi: Use TypeScript to create the same bucket, run pulumi preview → up, reuse npm packages.

Want to go deeper?

Explore:

Why Is It Important

The choice shapes developer velocity, team collaboration, and cloud governance. It affects state management, testing, and auditability.

Interview Tips

  • Define both tools clearly.
  • Highlight Terraform’s declarative approach vs Pulumi’s programming language flexibility.
  • Mention state backends, plan vs preview, policy-as-code, and provider ecosystems.

Trade-offs

  • Terraform: Easy to learn, huge ecosystem, but limited logic support.
  • Pulumi: More expressive, reusable code/testing, but risk of imperative anti-patterns and smaller ecosystem.

Pitfalls

  • Mixing business logic with infra code.
  • Committing secrets/state to repos.
  • Overusing hacks like null_resource or local-exec.
  • Misconception: “Terraform isn’t testable” or “Pulumi is only for devs”—both can be production-grade.
TAGS
System Design Interview
System Design Fundamentals
CONTRIBUTOR
Design Gurus Team
-

GET YOUR FREE

Coding Questions Catalog

Design Gurus Newsletter - Latest from our Blog
Boost your coding skills with our essential coding questions catalog.
Take a step towards a better tech career now!
Image
One-Stop Portal For Tech Interviews.
Copyright © 2025 Design Gurus, LLC. All rights reserved.