Pulumi
Infrastructure as code using real programming languages
Description
Pulumi is an open-source infrastructure as code tool that lets you define cloud resources using general-purpose programming languages like TypeScript, Python, Go, C#, and Java instead of domain-specific languages. It supports all major cloud providers and enables building, deploying, and managing infrastructure with familiar tools and workflows.
Install
brew install pulumicurl -fsSL https://get.pulumi.com | shAI Summary
Infrastructure as code platform that uses real programming languages (TypeScript, Python, Go, C#, Java) to define, deploy, and manage cloud infrastructure across all major providers.
Capabilities
- + Define cloud infrastructure using TypeScript, Python, Go, C#, or Java
- + Deploy and manage resources across AWS, Azure, GCP, and 100+ providers
- + Preview infrastructure changes before applying them
- + Manage secrets and configuration per environment
- + Track state and show diffs for infrastructure changes
- + Import existing cloud resources into Pulumi management
Use When
- → Building cloud infrastructure and want to use a real programming language instead of YAML/HCL
- → Managing multi-cloud deployments across AWS, Azure, and GCP
- → Need infrastructure as code with testing, IDE support, and package management
- → Automating cloud resource provisioning in CI/CD pipelines
Avoid When
- x Already invested heavily in Terraform/HCL and team is comfortable with it
- x Managing simple, single-resource deployments where a script suffices
- x Working in air-gapped environments without access to the Pulumi service backend
Usage Patterns
Create a new project
pulumi new aws-typescript Scaffolds a new Pulumi project using the AWS TypeScript template
Preview changes before deploying
pulumi preview Shows what resources would be created, updated, or deleted
Deploy infrastructure
pulumi up --yes Applies infrastructure changes, skipping the confirmation prompt
Set a secret configuration value
pulumi config set --secret dbPassword hunter2 Stores an encrypted configuration value for the current stack
Input / Output
Typical Pipelines
pulumi preview | grep -E '\+|\-|~' to see only changed resources pulumi stack output apiUrl to extract outputs for use in scripts pulumi up --yes && kubectl apply -f app.yaml to provision infra then deploy apps