Skip to main content
>_ supraj.dev
TOPIC IAC
Pulumi infrastructure as code using real programming languages
IN 10 SECONDS

Pulumi lets you define cloud infrastructure in TypeScript, Python, Go, or C# — not a DSL like HCL. You write a `for` loop to create 10 S3 buckets? Done. Import a library for string manipulation? Easy. Pulumi translates your code into cloud API calls and stores state just like Terraform.

GOTCHA Because Pulumi runs real code, your `pulumi up` can fail if your code has bugs. Unlike HCL which is purely declarative, a Pulumi program is a program — test it, review it, and use `pulumi preview` before every deployment.
HOW PULUMI DIFFERS FROM TERRAFORM
01 You write `new aws.s3.Bucket('my-bucket')` in TypeScript, with full IDE autocompletion.
02 Pulumi CLI runs your code — constructs a dependency graph from your program execution.
03 State engine compares the desired state (from your code) against the current state (from the backend).
04 Provider calls AWS APIs to create, update, or delete resources — or previews the changes with `pulumi preview`.
POKE IT YOURSELF
pulumi new aws-typescript — scaffold a new Pulumi project
pulumi stack select dev && pulumi up — select a stack and deploy