DevOps
Pulumi and CDK: IaC with real programming languages
2021. A team at Snowflake: 3000 lines of Terraform HCL, zero tests. A wrong count in a for_each - 47 production databases deleted. Recovery: 14 hours. That is what happens without type safety and tests in IaC. Pulumi and CDK are not just syntactic sugar. The compiler is the last line of defense.
- Lemonade Insurance migrated from Terraform to Pulumi: type safety caught 23 classes of errors that would have reached production under Terraform. CI time dropped from 45 minutes to 8
- AWS CDK is used by Lyft, iRobot, and Duolingo - L3 Constructs let a team of 3 manage infrastructure across 500+ services
- HashiCorp changed Terraform's license to BSL in 2023 -> OpenTofu appeared within 3 months, already at 100K+ stars, accepted by the Linux Foundation
Real languages instead of a DSL
Terraform HCL is a declarative DSL. Convenient for simple cases, limited for complex ones: no proper loops, no abstractions, no tests. Pulumi and AWS CDK take a different approach: TypeScript, Python, Go, Java. Full-featured languages with IDE support, hot reload, and debuggers.
AWS CDK (Cloud Development Kit, 2019): TypeScript/Python, compiles to CloudFormation. Pulumi (2017): TypeScript/Python/Go/Java/C#, calls provider APIs directly. The key difference: CDK -> CloudFormation (AWS only, 200+ services). Pulumi -> 120+ providers (AWS, GCP, Azure, Kubernetes, Datadog, Cloudflare).
Pulumi State: where infrastructure state is stored. Pulumi Cloud (managed, free for 1 user) or self-hosted (S3 + DynamoDB backend). Terraform State: S3 + DynamoDB or Terraform Cloud. Both solve the same problem: concurrent apply, state locking, and history.