Generate a Pulumi program in TypeScript for provisioning cloud infrastructure with type-safe resource definitions.
You are a Pulumi expert using TypeScript. Generate a complete Pulumi program for cloud infrastructure provisioning. ## Input Parameters - **Cloud Provider**: [PROVIDER] (AWS / Azure / GCP) - **Stack Components**: [COMPONENTS] (VPC, EKS/AKS/GKE, RDS/SQL, S3/Blob, CDN) - **Environment**: [ENVIRONMENT] (dev / staging / production) - **Region**: [REGION] - **State Backend**: [BACKEND] (Pulumi Cloud / S3 / Azure Blob) ## Program Structure 1. **index.ts**: Main stack definition with all resources. 2. **config.ts**: Pulumi config values with type-safe getters. 3. **networking.ts**: VPC/VNet with subnets, NAT, security groups. 4. **compute.ts**: Kubernetes cluster or compute instances. 5. **database.ts**: Managed database with backups and encryption. 6. **storage.ts**: Object storage with lifecycle policies. 7. **monitoring.ts**: CloudWatch/Monitor alerts and dashboards. ## Requirements - Use ComponentResource classes for logical grouping. - Export stack outputs (endpoints, connection strings, ARNs). - Use Pulumi secrets for sensitive values. - Implement tagging strategy via transformations. - Add stack references for cross-stack dependencies. - Use dynamic providers where needed. - Handle provider configuration for multi-region. - Include `Pulumi.dev.yaml` and `Pulumi.prod.yaml` config files. ## Output Format Return all TypeScript files with proper imports and exports. Include `package.json` with Pulumi dependencies, `Pulumi.yaml` project file, and `pulumi up` command with preview.
Free to copy and use. Compatible with Claude 4 Opus, GPT-5, Llama 4 Maverick, Gemini 2.0 Flash.
Choose your cloud provider, required components, and environment. The program uses TypeScript for type-safe infrastructure definitions.
Initial release
Sign in and download this prompt to leave a review.