# Pulumi
> Infrastructure as code using real programming languages

## 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

## When to Use
- 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

## When NOT to Use
- Already invested heavily in Terraform/HCL and team is comfortable with it
- Managing simple, single-resource deployments where a script suffices
- Working in air-gapped environments without access to the Pulumi service backend

## Key Flags
- `up`: Create or update infrastructure resources
- `preview`: Show a preview of updates without performing them
- `destroy`: Destroy all existing resources in the stack
- `stack`: Manage stacks (environments)
- `config set`: Set configuration values for the current stack
- `import`: Import existing cloud resources into a Pulumi stack

## 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
- **stdin**: Can accept confirmation input during interactive deployments
- **stdout**: Deployment progress, resource diffs, and stack outputs
- **stderr**: Error messages and warnings during deployment

## Installation
- **homebrew**: `brew install pulumi`
- **script**: `curl -fsSL https://get.pulumi.com | sh`

## Related Tools
- [kubectl](/tools/kubectl) (complementary): Pulumi can provision Kubernetes clusters, kubectl manages workloads on them
- [docker](/tools/docker) (complementary): Pulumi can build and push Docker images as part of infrastructure deployments
- [helm](/tools/helm) (complementary): Pulumi has a Helm provider for deploying Helm charts programmatically

---
Source: https://littlescripts.sh/tools/pulumi
