Pulumi Rules
Infrastructure as Code using real programming languages. Define cloud resources with TypeScript, Python, Go, or C#.
3 rules
Use Component Resources for Abstraction
Intermediate
All reusable infrastructure patterns must be encapsulated as Pulumi component resources — never create flat lists of primitive resources when a logical grouping exists.
globs: **/index.ts, **/__main__.py, **/main.go, **/components/**
component-resources, abstraction, reusability, architecture
View Rule
Always Preview Before Deploying
Beginner
Every Pulumi deployment must be preceded by a preview. CI/CD pipelines must run 'pulumi preview' on pull requests and require approval before 'pulumi up' on production stacks.
globs: **/.github/**, **/.gitlab-ci*, **/Pulumi*.yaml, **/pipeline*
preview, deployment-safety, ci-cd, approval
View Rule
Use Typed Configuration Access
Beginner
All Pulumi configuration access must use typed methods (requireNumber, requireSecret, getBoolean) — never use untyped get() without validation in production infrastructure code.
globs: **/Pulumi*.yaml, **/index.ts, **/__main__.py, **/main.go
configuration, type-safety, secrets, validation
View Rule