Terraform taught us infrastructure as code. But HCL has limits — conditionals are cumbersome, loops are limited, no unit tests. Pulumi says: write infrastructure in a real programming language.
Pulumi vs. Terraform¶
Pulumi: TypeScript/Python/Go, full programming language, existing tooling (IDE, linter, test framework). Terraform: HCL, declarative, huge provider ecosystem, battle-tested.
Example in TypeScript¶
import * as aws from "@pulumi/aws";
import * as k8s from "@pulumi/kubernetes";
const cluster = new aws.eks.Cluster("prod", {
vpcConfig: { subnetIds: subnets.ids }
});
const app = new k8s.apps.v1.Deployment("api", {
spec: { replicas: 3, ... }
}, { provider: cluster.provider });
Advantages of a Real Language¶
- Loops, conditions, functions — the full power of the language
- Unit tests for infrastructure
- IDE support (autocomplete, type checking)
- Code sharing as npm/pip packages
Why We’re Sticking with Terraform for Now¶
Provider ecosystem. Community. Hiring — finding a Terraform engineer is easier. And HCL’s declarative approach is simpler for review than imperative TypeScript. But we’re watching Pulumi closely.
Pulumi Is the Future for Complex Infrastructure¶
For simple setups, Terraform is enough. For complex infrastructure with logic, testing, and componentization, Pulumi has a significant advantage.
Need help with implementation?
Our experts can help with design, implementation, and operations. From architecture to production.
Contact us