container-superposition 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +843 -0
- package/dist/scripts/init.d.ts +3 -0
- package/dist/scripts/init.d.ts.map +1 -0
- package/dist/scripts/init.js +1190 -0
- package/dist/scripts/init.js.map +1 -0
- package/dist/scripts/migrate-to-manifests.d.ts +12 -0
- package/dist/scripts/migrate-to-manifests.d.ts.map +1 -0
- package/dist/scripts/migrate-to-manifests.js +230 -0
- package/dist/scripts/migrate-to-manifests.js.map +1 -0
- package/dist/tool/questionnaire/composer.d.ts +6 -0
- package/dist/tool/questionnaire/composer.d.ts.map +1 -0
- package/dist/tool/questionnaire/composer.js +1232 -0
- package/dist/tool/questionnaire/composer.js.map +1 -0
- package/dist/tool/readme/markdown-parser.d.ts +30 -0
- package/dist/tool/readme/markdown-parser.d.ts.map +1 -0
- package/dist/tool/readme/markdown-parser.js +139 -0
- package/dist/tool/readme/markdown-parser.js.map +1 -0
- package/dist/tool/readme/readme-generator.d.ts +9 -0
- package/dist/tool/readme/readme-generator.d.ts.map +1 -0
- package/dist/tool/readme/readme-generator.js +422 -0
- package/dist/tool/readme/readme-generator.js.map +1 -0
- package/dist/tool/schema/custom-loader.d.ts +17 -0
- package/dist/tool/schema/custom-loader.d.ts.map +1 -0
- package/dist/tool/schema/custom-loader.js +149 -0
- package/dist/tool/schema/custom-loader.js.map +1 -0
- package/dist/tool/schema/overlay-loader.d.ts +47 -0
- package/dist/tool/schema/overlay-loader.d.ts.map +1 -0
- package/dist/tool/schema/overlay-loader.js +252 -0
- package/dist/tool/schema/overlay-loader.js.map +1 -0
- package/dist/tool/schema/types.d.ts +212 -0
- package/dist/tool/schema/types.d.ts.map +1 -0
- package/dist/tool/schema/types.js +5 -0
- package/dist/tool/schema/types.js.map +1 -0
- package/docs/README.md +308 -0
- package/docs/architecture.md +233 -0
- package/docs/creating-overlays.md +549 -0
- package/docs/custom-patches.md +540 -0
- package/docs/dependencies.md +279 -0
- package/docs/examples/custom-patches-example.md +85 -0
- package/docs/examples.md +576 -0
- package/docs/messaging-comparison.md +265 -0
- package/docs/messaging-quick-start.md +385 -0
- package/docs/observability-workflow.md +537 -0
- package/docs/overlay-manifest-refactoring.md +214 -0
- package/docs/overlay-metadata-archive.md +54 -0
- package/docs/overlays.md +523 -0
- package/docs/presets-architecture.md +498 -0
- package/docs/presets.md +366 -0
- package/docs/publishing.md +476 -0
- package/docs/quick-reference.md +326 -0
- package/docs/ux.md +170 -0
- package/features/README.md +85 -0
- package/features/cross-distro-packages/README.md +146 -0
- package/features/cross-distro-packages/devcontainer-feature.json +20 -0
- package/features/cross-distro-packages/install.sh +58 -0
- package/features/local-secrets-manager/devcontainer-feature.json +18 -0
- package/features/local-secrets-manager/install.sh +127 -0
- package/features/project-scaffolder/devcontainer-feature.json +24 -0
- package/features/project-scaffolder/install.sh +100 -0
- package/features/team-conventions/devcontainer-feature.json +24 -0
- package/features/team-conventions/install.sh +93 -0
- package/overlays/.registry/README.md +14 -0
- package/overlays/.registry/base-images.yml +26 -0
- package/overlays/.registry/base-templates.yml +7 -0
- package/overlays/README.md +155 -0
- package/overlays/alertmanager/.env.example +5 -0
- package/overlays/alertmanager/README.md +465 -0
- package/overlays/alertmanager/alert-rules.yml +56 -0
- package/overlays/alertmanager/alertmanager.yml +42 -0
- package/overlays/alertmanager/devcontainer.patch.json +12 -0
- package/overlays/alertmanager/docker-compose.yml +20 -0
- package/overlays/alertmanager/overlay.yml +17 -0
- package/overlays/alertmanager/setup.sh +53 -0
- package/overlays/alertmanager/verify.sh +31 -0
- package/overlays/aws-cli/README.md +473 -0
- package/overlays/aws-cli/devcontainer.patch.json +13 -0
- package/overlays/aws-cli/overlay.yml +13 -0
- package/overlays/azure-cli/README.md +551 -0
- package/overlays/azure-cli/devcontainer.patch.json +8 -0
- package/overlays/azure-cli/overlay.yml +13 -0
- package/overlays/bun/README.md +312 -0
- package/overlays/bun/devcontainer.patch.json +41 -0
- package/overlays/bun/overlay.yml +16 -0
- package/overlays/bun/setup.sh +79 -0
- package/overlays/bun/verify.sh +30 -0
- package/overlays/codex/README.md +128 -0
- package/overlays/codex/devcontainer.patch.json +3 -0
- package/overlays/codex/overlay.yml +14 -0
- package/overlays/codex/setup.sh +24 -0
- package/overlays/codex/verify.sh +30 -0
- package/overlays/commitlint/README.md +333 -0
- package/overlays/commitlint/devcontainer.patch.json +8 -0
- package/overlays/commitlint/overlay.yml +16 -0
- package/overlays/commitlint/setup.sh +234 -0
- package/overlays/direnv/README.md +504 -0
- package/overlays/direnv/devcontainer.patch.json +6 -0
- package/overlays/direnv/overlay.yml +13 -0
- package/overlays/direnv/setup.sh +139 -0
- package/overlays/docker-in-docker/README.md +534 -0
- package/overlays/docker-in-docker/devcontainer.patch.json +10 -0
- package/overlays/docker-in-docker/overlay.yml +13 -0
- package/overlays/docker-sock/README.md +256 -0
- package/overlays/docker-sock/devcontainer.patch.json +9 -0
- package/overlays/docker-sock/docker-compose.yml +8 -0
- package/overlays/docker-sock/overlay.yml +13 -0
- package/overlays/dotnet/README.md +147 -0
- package/overlays/dotnet/devcontainer.patch.json +51 -0
- package/overlays/dotnet/global-tools.txt +24 -0
- package/overlays/dotnet/overlay.yml +13 -0
- package/overlays/dotnet/setup.sh +51 -0
- package/overlays/dotnet/verify.sh +26 -0
- package/overlays/gcloud/README.md +269 -0
- package/overlays/gcloud/devcontainer.patch.json +14 -0
- package/overlays/gcloud/overlay.yml +14 -0
- package/overlays/gcloud/verify.sh +52 -0
- package/overlays/git-helpers/README.md +168 -0
- package/overlays/git-helpers/devcontainer.patch.json +33 -0
- package/overlays/git-helpers/overlay.yml +15 -0
- package/overlays/git-helpers/setup.sh +91 -0
- package/overlays/go/README.md +293 -0
- package/overlays/go/devcontainer.patch.json +43 -0
- package/overlays/go/overlay.yml +15 -0
- package/overlays/go/setup.sh +33 -0
- package/overlays/go/verify.sh +40 -0
- package/overlays/grafana/.env.example +9 -0
- package/overlays/grafana/README.md +462 -0
- package/overlays/grafana/dashboard-provider.yml +11 -0
- package/overlays/grafana/dashboards/observability-overview.json +263 -0
- package/overlays/grafana/devcontainer.patch.json +12 -0
- package/overlays/grafana/docker-compose.yml +27 -0
- package/overlays/grafana/grafana-datasources.yml +57 -0
- package/overlays/grafana/overlay.yml +21 -0
- package/overlays/grafana/verify.sh +34 -0
- package/overlays/jaeger/.env.example +7 -0
- package/overlays/jaeger/README.md +867 -0
- package/overlays/jaeger/devcontainer.patch.json +12 -0
- package/overlays/jaeger/docker-compose.yml +17 -0
- package/overlays/jaeger/overlay.yml +19 -0
- package/overlays/java/README.md +267 -0
- package/overlays/java/devcontainer.patch.json +44 -0
- package/overlays/java/overlay.yml +16 -0
- package/overlays/java/setup.sh +41 -0
- package/overlays/java/verify.sh +42 -0
- package/overlays/just/README.md +443 -0
- package/overlays/just/devcontainer.patch.json +3 -0
- package/overlays/just/overlay.yml +13 -0
- package/overlays/just/setup.sh +182 -0
- package/overlays/kubectl-helm/README.md +660 -0
- package/overlays/kubectl-helm/devcontainer.patch.json +10 -0
- package/overlays/kubectl-helm/overlay.yml +13 -0
- package/overlays/loki/.env.example +5 -0
- package/overlays/loki/README.md +1156 -0
- package/overlays/loki/devcontainer.patch.json +12 -0
- package/overlays/loki/docker-compose.yml +18 -0
- package/overlays/loki/loki-config.yaml +45 -0
- package/overlays/loki/overlay.yml +17 -0
- package/overlays/minio/.env.example +9 -0
- package/overlays/minio/README.md +639 -0
- package/overlays/minio/devcontainer.patch.json +30 -0
- package/overlays/minio/docker-compose.yml +28 -0
- package/overlays/minio/overlay.yml +18 -0
- package/overlays/minio/setup.sh +61 -0
- package/overlays/minio/verify.sh +64 -0
- package/overlays/mkdocs/README.md +309 -0
- package/overlays/mkdocs/devcontainer.patch.json +24 -0
- package/overlays/mkdocs/overlay.yml +15 -0
- package/overlays/modern-cli-tools/README.md +556 -0
- package/overlays/modern-cli-tools/devcontainer.patch.json +3 -0
- package/overlays/modern-cli-tools/overlay.yml +13 -0
- package/overlays/modern-cli-tools/setup.sh +153 -0
- package/overlays/mongodb/.env.example +9 -0
- package/overlays/mongodb/README.md +481 -0
- package/overlays/mongodb/devcontainer.patch.json +32 -0
- package/overlays/mongodb/docker-compose.yml +44 -0
- package/overlays/mongodb/overlay.yml +17 -0
- package/overlays/mongodb/verify.sh +48 -0
- package/overlays/mysql/.env.example +11 -0
- package/overlays/mysql/README.md +542 -0
- package/overlays/mysql/devcontainer.patch.json +34 -0
- package/overlays/mysql/docker-compose.yml +55 -0
- package/overlays/mysql/overlay.yml +16 -0
- package/overlays/mysql/verify.sh +48 -0
- package/overlays/nats/.env.example +5 -0
- package/overlays/nats/README.md +762 -0
- package/overlays/nats/devcontainer.patch.json +24 -0
- package/overlays/nats/docker-compose.yml +31 -0
- package/overlays/nats/overlay.yml +18 -0
- package/overlays/nats/verify.sh +50 -0
- package/overlays/ngrok/README.md +503 -0
- package/overlays/ngrok/devcontainer.patch.json +3 -0
- package/overlays/ngrok/overlay.yml +14 -0
- package/overlays/ngrok/setup.sh +125 -0
- package/overlays/nodejs/README.md +192 -0
- package/overlays/nodejs/devcontainer.patch.json +49 -0
- package/overlays/nodejs/global-packages.txt +16 -0
- package/overlays/nodejs/overlay.yml +14 -0
- package/overlays/nodejs/setup.sh +46 -0
- package/overlays/nodejs/verify.sh +32 -0
- package/overlays/otel-collector/.env.example +9 -0
- package/overlays/otel-collector/README.md +1257 -0
- package/overlays/otel-collector/devcontainer.patch.json +28 -0
- package/overlays/otel-collector/docker-compose.yml +22 -0
- package/overlays/otel-collector/otel-collector-config.yaml +68 -0
- package/overlays/otel-collector/overlay.yml +21 -0
- package/overlays/otel-collector/setup.sh +49 -0
- package/overlays/otel-demo-nodejs/.env.example +2 -0
- package/overlays/otel-demo-nodejs/Dockerfile-otel-demo-nodejs +17 -0
- package/overlays/otel-demo-nodejs/README.md +409 -0
- package/overlays/otel-demo-nodejs/devcontainer.patch.json +12 -0
- package/overlays/otel-demo-nodejs/docker-compose.yml +19 -0
- package/overlays/otel-demo-nodejs/overlay.yml +23 -0
- package/overlays/otel-demo-nodejs/package-otel-demo-nodejs.json +20 -0
- package/overlays/otel-demo-nodejs/server-otel-demo-nodejs.js +259 -0
- package/overlays/otel-demo-nodejs/tracing-otel-demo-nodejs.js +57 -0
- package/overlays/otel-demo-nodejs/verify.sh +31 -0
- package/overlays/otel-demo-python/.env.example +2 -0
- package/overlays/otel-demo-python/Dockerfile-otel-demo-python +16 -0
- package/overlays/otel-demo-python/README.md +82 -0
- package/overlays/otel-demo-python/app-otel-demo-python.py +208 -0
- package/overlays/otel-demo-python/devcontainer.patch.json +12 -0
- package/overlays/otel-demo-python/docker-compose.yml +19 -0
- package/overlays/otel-demo-python/overlay.yml +23 -0
- package/overlays/otel-demo-python/requirements-otel-demo-python.txt +4 -0
- package/overlays/otel-demo-python/verify.sh +31 -0
- package/overlays/playwright/README.md +629 -0
- package/overlays/playwright/devcontainer.patch.json +9 -0
- package/overlays/playwright/overlay.yml +13 -0
- package/overlays/postgres/.env.example +6 -0
- package/overlays/postgres/README.md +602 -0
- package/overlays/postgres/devcontainer.patch.json +21 -0
- package/overlays/postgres/docker-compose.yml +22 -0
- package/overlays/postgres/overlay.yml +15 -0
- package/overlays/postgres/verify.sh +45 -0
- package/overlays/powershell/README.md +314 -0
- package/overlays/powershell/devcontainer.patch.json +22 -0
- package/overlays/powershell/overlay.yml +13 -0
- package/overlays/powershell/setup.sh +29 -0
- package/overlays/powershell/verify.sh +38 -0
- package/overlays/pre-commit/README.md +263 -0
- package/overlays/pre-commit/devcontainer.patch.json +9 -0
- package/overlays/pre-commit/overlay.yml +16 -0
- package/overlays/pre-commit/setup.sh +129 -0
- package/overlays/presets/docs-site.yml +118 -0
- package/overlays/presets/fullstack.yml +181 -0
- package/overlays/presets/microservice.yml +118 -0
- package/overlays/presets/web-api.yml +109 -0
- package/overlays/prometheus/.env.example +5 -0
- package/overlays/prometheus/README.md +1246 -0
- package/overlays/prometheus/devcontainer.patch.json +12 -0
- package/overlays/prometheus/docker-compose.yml +22 -0
- package/overlays/prometheus/overlay.yml +17 -0
- package/overlays/prometheus/prometheus.yml +12 -0
- package/overlays/prometheus/verify.sh +34 -0
- package/overlays/promtail/.env.example +2 -0
- package/overlays/promtail/README.md +357 -0
- package/overlays/promtail/devcontainer.patch.json +5 -0
- package/overlays/promtail/docker-compose.yml +16 -0
- package/overlays/promtail/overlay.yml +17 -0
- package/overlays/promtail/promtail-config.yaml +60 -0
- package/overlays/promtail/verify.sh +31 -0
- package/overlays/pulumi/README.md +472 -0
- package/overlays/pulumi/devcontainer.patch.json +13 -0
- package/overlays/pulumi/overlay.yml +14 -0
- package/overlays/pulumi/verify.sh +31 -0
- package/overlays/python/README.md +919 -0
- package/overlays/python/devcontainer.patch.json +41 -0
- package/overlays/python/overlay.yml +12 -0
- package/overlays/python/requirements-overlay.txt +13 -0
- package/overlays/python/setup.sh +47 -0
- package/overlays/python/verify.sh +32 -0
- package/overlays/rabbitmq/.env.example +7 -0
- package/overlays/rabbitmq/README.md +680 -0
- package/overlays/rabbitmq/devcontainer.patch.json +28 -0
- package/overlays/rabbitmq/docker-compose.yml +30 -0
- package/overlays/rabbitmq/overlay.yml +18 -0
- package/overlays/rabbitmq/verify.sh +41 -0
- package/overlays/redis/.env.example +4 -0
- package/overlays/redis/README.md +776 -0
- package/overlays/redis/devcontainer.patch.json +21 -0
- package/overlays/redis/docker-compose.yml +21 -0
- package/overlays/redis/overlay.yml +15 -0
- package/overlays/redis/verify.sh +41 -0
- package/overlays/redpanda/.env.example +10 -0
- package/overlays/redpanda/README.md +703 -0
- package/overlays/redpanda/devcontainer.patch.json +37 -0
- package/overlays/redpanda/docker-compose.yml +67 -0
- package/overlays/redpanda/overlay.yml +21 -0
- package/overlays/redpanda/verify.sh +48 -0
- package/overlays/rust/README.md +299 -0
- package/overlays/rust/devcontainer.patch.json +39 -0
- package/overlays/rust/overlay.yml +15 -0
- package/overlays/rust/setup.sh +36 -0
- package/overlays/rust/verify.sh +51 -0
- package/overlays/sqlite/README.md +584 -0
- package/overlays/sqlite/devcontainer.patch.json +14 -0
- package/overlays/sqlite/overlay.yml +15 -0
- package/overlays/sqlite/setup.sh +27 -0
- package/overlays/sqlite/verify.sh +43 -0
- package/overlays/sqlserver/.env.example +6 -0
- package/overlays/sqlserver/README.md +592 -0
- package/overlays/sqlserver/devcontainer.patch.json +22 -0
- package/overlays/sqlserver/docker-compose.yml +32 -0
- package/overlays/sqlserver/overlay.yml +17 -0
- package/overlays/sqlserver/verify.sh +30 -0
- package/overlays/tempo/.env.example +5 -0
- package/overlays/tempo/README.md +273 -0
- package/overlays/tempo/devcontainer.patch.json +12 -0
- package/overlays/tempo/docker-compose.yml +20 -0
- package/overlays/tempo/overlay.yml +20 -0
- package/overlays/tempo/tempo-config.yaml +32 -0
- package/overlays/tempo/verify.sh +31 -0
- package/overlays/terraform/README.md +389 -0
- package/overlays/terraform/devcontainer.patch.json +15 -0
- package/overlays/terraform/overlay.yml +14 -0
- package/overlays/terraform/verify.sh +63 -0
- package/package.json +74 -0
- package/templates/README.md +285 -0
- package/templates/compose/.devcontainer/devcontainer.json +46 -0
- package/templates/compose/.devcontainer/docker-compose.yml +12 -0
- package/templates/compose/README.md +20 -0
- package/templates/plain/.devcontainer/devcontainer.json +35 -0
- package/templates/plain/README.md +21 -0
- package/tool/README.md +281 -0
- package/tool/schema/base-images.schema.json +43 -0
- package/tool/schema/base-templates.schema.json +34 -0
- package/tool/schema/config.schema.json +71 -0
- package/tool/schema/overlay-manifest.schema.json +86 -0
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
# Pulumi Overlay
|
|
2
|
+
|
|
3
|
+
Adds Pulumi CLI for modern Infrastructure as Code using familiar programming languages.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Pulumi CLI** - Latest version of Pulumi
|
|
8
|
+
- **Multi-language Support** - Use TypeScript, Python, Go, .NET, Java, or YAML
|
|
9
|
+
- **VS Code Extension:** Pulumi LSP Client (pulumi.pulumi-lsp-client)
|
|
10
|
+
- IntelliSense and autocomplete
|
|
11
|
+
- Error detection
|
|
12
|
+
- Resource documentation
|
|
13
|
+
|
|
14
|
+
## Getting Started
|
|
15
|
+
|
|
16
|
+
### Prerequisites
|
|
17
|
+
|
|
18
|
+
Pulumi works with programming languages. Select appropriate language overlay:
|
|
19
|
+
|
|
20
|
+
- **nodejs** - For TypeScript/JavaScript
|
|
21
|
+
- **python** - For Python
|
|
22
|
+
- **dotnet** - For C#/F#
|
|
23
|
+
- **Go** - (requires additional setup)
|
|
24
|
+
|
|
25
|
+
### Login to Pulumi
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Login to Pulumi Cloud (free tier available)
|
|
29
|
+
pulumi login
|
|
30
|
+
|
|
31
|
+
# Or use local backend
|
|
32
|
+
pulumi login file://~/.pulumi
|
|
33
|
+
|
|
34
|
+
# Or use AWS S3
|
|
35
|
+
pulumi login s3://my-pulumi-state-bucket
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Create New Project
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# TypeScript/JavaScript (requires nodejs overlay)
|
|
42
|
+
pulumi new aws-typescript
|
|
43
|
+
|
|
44
|
+
# Python (requires python overlay)
|
|
45
|
+
pulumi new aws-python
|
|
46
|
+
|
|
47
|
+
# C# (requires dotnet overlay)
|
|
48
|
+
pulumi new aws-csharp
|
|
49
|
+
|
|
50
|
+
# YAML (no language overlay needed)
|
|
51
|
+
pulumi new aws-yaml
|
|
52
|
+
|
|
53
|
+
# Go
|
|
54
|
+
pulumi new aws-go
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Basic Commands
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Install dependencies (language-specific)
|
|
61
|
+
npm install # TypeScript
|
|
62
|
+
pip install -r requirements.txt # Python
|
|
63
|
+
|
|
64
|
+
# Preview changes
|
|
65
|
+
pulumi preview
|
|
66
|
+
|
|
67
|
+
# Deploy infrastructure
|
|
68
|
+
pulumi up
|
|
69
|
+
|
|
70
|
+
# Update stack configuration
|
|
71
|
+
pulumi config set aws:region us-west-2
|
|
72
|
+
|
|
73
|
+
# View stack outputs
|
|
74
|
+
pulumi stack output
|
|
75
|
+
|
|
76
|
+
# Destroy infrastructure
|
|
77
|
+
pulumi destroy
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Stack Management
|
|
81
|
+
|
|
82
|
+
### Create and Select Stacks
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# Create new stack
|
|
86
|
+
pulumi stack init dev
|
|
87
|
+
|
|
88
|
+
# List stacks
|
|
89
|
+
pulumi stack ls
|
|
90
|
+
|
|
91
|
+
# Select stack
|
|
92
|
+
pulumi stack select prod
|
|
93
|
+
|
|
94
|
+
# View current stack
|
|
95
|
+
pulumi stack
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Configuration
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# Set configuration values
|
|
102
|
+
pulumi config set databasePassword S3cret! --secret
|
|
103
|
+
|
|
104
|
+
# Get configuration values
|
|
105
|
+
pulumi config get databasePassword
|
|
106
|
+
|
|
107
|
+
# View all config
|
|
108
|
+
pulumi config
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Language-Specific Examples
|
|
112
|
+
|
|
113
|
+
### TypeScript
|
|
114
|
+
|
|
115
|
+
**index.ts:**
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
import * as pulumi from '@pulumi/pulumi';
|
|
119
|
+
import * as aws from '@pulumi/aws';
|
|
120
|
+
|
|
121
|
+
// Create an S3 bucket
|
|
122
|
+
const bucket = new aws.s3.Bucket('my-bucket', {
|
|
123
|
+
acl: 'private',
|
|
124
|
+
tags: {
|
|
125
|
+
Environment: 'dev',
|
|
126
|
+
},
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
// Export bucket name
|
|
130
|
+
export const bucketName = bucket.id;
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Run:**
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
npm install @pulumi/aws @pulumi/pulumi
|
|
137
|
+
pulumi up
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Python
|
|
141
|
+
|
|
142
|
+
\***\*main**.py:\*\*
|
|
143
|
+
|
|
144
|
+
```python
|
|
145
|
+
import pulumi
|
|
146
|
+
import pulumi_aws as aws
|
|
147
|
+
|
|
148
|
+
# Create an S3 bucket
|
|
149
|
+
bucket = aws.s3.Bucket('my-bucket',
|
|
150
|
+
acl='private',
|
|
151
|
+
tags={
|
|
152
|
+
'Environment': 'dev',
|
|
153
|
+
})
|
|
154
|
+
|
|
155
|
+
# Export bucket name
|
|
156
|
+
pulumi.export('bucket_name', bucket.id)
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
**Run:**
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
pip install pulumi pulumi-aws
|
|
163
|
+
pulumi up
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### YAML
|
|
167
|
+
|
|
168
|
+
**Pulumi.yaml:**
|
|
169
|
+
|
|
170
|
+
```yaml
|
|
171
|
+
name: my-project
|
|
172
|
+
runtime: yaml
|
|
173
|
+
description: Infrastructure as YAML
|
|
174
|
+
|
|
175
|
+
resources:
|
|
176
|
+
my-bucket:
|
|
177
|
+
type: aws:s3:Bucket
|
|
178
|
+
properties:
|
|
179
|
+
acl: private
|
|
180
|
+
tags:
|
|
181
|
+
Environment: dev
|
|
182
|
+
|
|
183
|
+
outputs:
|
|
184
|
+
bucketName: ${my-bucket.id}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**Run:**
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
pulumi up
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## Backend Configuration
|
|
194
|
+
|
|
195
|
+
### Pulumi Cloud (Default)
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
# Login
|
|
199
|
+
pulumi login
|
|
200
|
+
|
|
201
|
+
# Automatic state management, secrets encryption, and team collaboration
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Local Backend
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
# Login to local filesystem
|
|
208
|
+
pulumi login file://~/.pulumi
|
|
209
|
+
|
|
210
|
+
# State stored in ~/.pulumi directory
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### AWS S3 Backend
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
# Login to S3 bucket
|
|
217
|
+
pulumi login s3://my-pulumi-state-bucket
|
|
218
|
+
|
|
219
|
+
# Optional: Set region
|
|
220
|
+
export AWS_REGION=us-east-1
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Azure Blob Storage
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
pulumi login azblob://my-container
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Google Cloud Storage
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
pulumi login gs://my-pulumi-state-bucket
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## Provider Configuration
|
|
236
|
+
|
|
237
|
+
### AWS
|
|
238
|
+
|
|
239
|
+
```typescript
|
|
240
|
+
import * as aws from '@pulumi/aws';
|
|
241
|
+
|
|
242
|
+
const provider = new aws.Provider('my-provider', {
|
|
243
|
+
region: 'us-west-2',
|
|
244
|
+
profile: 'dev',
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
const bucket = new aws.s3.Bucket(
|
|
248
|
+
'my-bucket',
|
|
249
|
+
{},
|
|
250
|
+
{
|
|
251
|
+
provider: provider,
|
|
252
|
+
}
|
|
253
|
+
);
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
**Authentication:**
|
|
257
|
+
|
|
258
|
+
- AWS CLI credentials
|
|
259
|
+
- Environment variables: `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`
|
|
260
|
+
- IAM roles
|
|
261
|
+
|
|
262
|
+
### Google Cloud
|
|
263
|
+
|
|
264
|
+
```typescript
|
|
265
|
+
import * as gcp from '@pulumi/gcp';
|
|
266
|
+
|
|
267
|
+
const provider = new gcp.Provider('my-provider', {
|
|
268
|
+
project: 'my-project-id',
|
|
269
|
+
region: 'us-central1',
|
|
270
|
+
credentials: process.env.GOOGLE_APPLICATION_CREDENTIALS,
|
|
271
|
+
});
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### Azure
|
|
275
|
+
|
|
276
|
+
```typescript
|
|
277
|
+
import * as azure from '@pulumi/azure-native';
|
|
278
|
+
|
|
279
|
+
const provider = new azure.Provider('my-provider', {
|
|
280
|
+
location: 'eastus',
|
|
281
|
+
});
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
## Secrets Management
|
|
285
|
+
|
|
286
|
+
### Stack Secrets
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
# Set secret configuration
|
|
290
|
+
pulumi config set --secret dbPassword S3cret!
|
|
291
|
+
|
|
292
|
+
# Access in code (TypeScript)
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
```typescript
|
|
296
|
+
import * as pulumi from '@pulumi/pulumi';
|
|
297
|
+
|
|
298
|
+
const config = new pulumi.Config();
|
|
299
|
+
const dbPassword = config.requireSecret('dbPassword');
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### External Secrets
|
|
303
|
+
|
|
304
|
+
```typescript
|
|
305
|
+
// AWS Secrets Manager
|
|
306
|
+
import * as aws from '@pulumi/aws';
|
|
307
|
+
|
|
308
|
+
const secret = aws.secretsmanager.getSecretVersion({
|
|
309
|
+
secretId: 'prod/db/password',
|
|
310
|
+
});
|
|
311
|
+
|
|
312
|
+
const db = new aws.rds.Instance('db', {
|
|
313
|
+
password: secret.then((s) => s.secretString),
|
|
314
|
+
});
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
## Common Use Cases
|
|
318
|
+
|
|
319
|
+
### Multi-Cloud Infrastructure
|
|
320
|
+
|
|
321
|
+
```typescript
|
|
322
|
+
import * as aws from '@pulumi/aws';
|
|
323
|
+
import * as gcp from '@pulumi/gcp';
|
|
324
|
+
import * as azure from '@pulumi/azure-native';
|
|
325
|
+
|
|
326
|
+
// AWS resources
|
|
327
|
+
const awsBucket = new aws.s3.Bucket('aws-bucket');
|
|
328
|
+
|
|
329
|
+
// GCP resources
|
|
330
|
+
const gcpBucket = new gcp.storage.Bucket('gcp-bucket');
|
|
331
|
+
|
|
332
|
+
// Azure resources
|
|
333
|
+
const azureStorage = new azure.storage.StorageAccount('azure-storage');
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### Kubernetes Deployment
|
|
337
|
+
|
|
338
|
+
```typescript
|
|
339
|
+
import * as k8s from '@pulumi/kubernetes';
|
|
340
|
+
|
|
341
|
+
const deployment = new k8s.apps.v1.Deployment('app', {
|
|
342
|
+
spec: {
|
|
343
|
+
selector: { matchLabels: { app: 'nginx' } },
|
|
344
|
+
replicas: 3,
|
|
345
|
+
template: {
|
|
346
|
+
metadata: { labels: { app: 'nginx' } },
|
|
347
|
+
spec: {
|
|
348
|
+
containers: [
|
|
349
|
+
{
|
|
350
|
+
name: 'nginx',
|
|
351
|
+
image: 'nginx:latest',
|
|
352
|
+
},
|
|
353
|
+
],
|
|
354
|
+
},
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
});
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
## Best Practices
|
|
361
|
+
|
|
362
|
+
1. **Use strong typing** - Leverage TypeScript/C# for type safety
|
|
363
|
+
2. **Organize code** - Separate resources into modules/components
|
|
364
|
+
3. **Stack per environment** - dev, staging, prod stacks
|
|
365
|
+
4. **Secrets in config** - Use `pulumi config set --secret`
|
|
366
|
+
5. **Export outputs** - Make important values accessible
|
|
367
|
+
6. **CI/CD integration** - Automate deployments
|
|
368
|
+
7. **Version lock** - Pin package versions
|
|
369
|
+
8. **Review previews** - Always run `pulumi preview` first
|
|
370
|
+
9. **Tag resources** - Add metadata for organization
|
|
371
|
+
10. **Use components** - Create reusable infrastructure components
|
|
372
|
+
|
|
373
|
+
## CI/CD Integration
|
|
374
|
+
|
|
375
|
+
### GitHub Actions
|
|
376
|
+
|
|
377
|
+
```yaml
|
|
378
|
+
- name: Install Pulumi
|
|
379
|
+
uses: pulumi/actions@v4
|
|
380
|
+
|
|
381
|
+
- name: Pulumi Preview
|
|
382
|
+
run: pulumi preview
|
|
383
|
+
env:
|
|
384
|
+
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
|
|
385
|
+
|
|
386
|
+
- name: Pulumi Up
|
|
387
|
+
run: pulumi up --yes
|
|
388
|
+
env:
|
|
389
|
+
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
### Environment Variables
|
|
393
|
+
|
|
394
|
+
```bash
|
|
395
|
+
# Pulumi access token
|
|
396
|
+
export PULUMI_ACCESS_TOKEN=pul-xxxxx
|
|
397
|
+
|
|
398
|
+
# AWS credentials
|
|
399
|
+
export AWS_ACCESS_KEY_ID=xxxxx
|
|
400
|
+
export AWS_SECRET_ACCESS_KEY=xxxxx
|
|
401
|
+
|
|
402
|
+
# GCP credentials
|
|
403
|
+
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json
|
|
404
|
+
|
|
405
|
+
# Azure credentials
|
|
406
|
+
export ARM_CLIENT_ID=xxxxx
|
|
407
|
+
export ARM_CLIENT_SECRET=xxxxx
|
|
408
|
+
export ARM_SUBSCRIPTION_ID=xxxxx
|
|
409
|
+
export ARM_TENANT_ID=xxxxx
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
## Troubleshooting
|
|
413
|
+
|
|
414
|
+
### pulumi command not found
|
|
415
|
+
|
|
416
|
+
Rebuild container:
|
|
417
|
+
|
|
418
|
+
- **VS Code:** `Cmd+Shift+P` → "Dev Containers: Rebuild Container"
|
|
419
|
+
|
|
420
|
+
### Login issues
|
|
421
|
+
|
|
422
|
+
```bash
|
|
423
|
+
# Re-login
|
|
424
|
+
pulumi logout
|
|
425
|
+
pulumi login
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
### State conflicts
|
|
429
|
+
|
|
430
|
+
```bash
|
|
431
|
+
# Refresh state
|
|
432
|
+
pulumi refresh
|
|
433
|
+
|
|
434
|
+
# Export/import state
|
|
435
|
+
pulumi stack export > stack.json
|
|
436
|
+
pulumi stack import < stack.json
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
### Provider authentication
|
|
440
|
+
|
|
441
|
+
```bash
|
|
442
|
+
# AWS
|
|
443
|
+
aws sts get-caller-identity
|
|
444
|
+
|
|
445
|
+
# GCP
|
|
446
|
+
gcloud auth application-default login
|
|
447
|
+
|
|
448
|
+
# Azure
|
|
449
|
+
az login
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
## Pulumi vs Terraform
|
|
453
|
+
|
|
454
|
+
| Feature | Pulumi | Terraform |
|
|
455
|
+
| ------------------ | -------------------------------------- | ----------- |
|
|
456
|
+
| **Language** | TypeScript, Python, Go, C#, Java, YAML | HCL |
|
|
457
|
+
| **Type Safety** | ✅ Strong typing (TS/C#) | ⚠️ Limited |
|
|
458
|
+
| **Learning Curve** | Familiar languages | New DSL |
|
|
459
|
+
| **Testing** | Unit tests with language frameworks | Limited |
|
|
460
|
+
| **State** | Managed service or self-hosted | Self-hosted |
|
|
461
|
+
| **Ecosystem** | Growing | Mature |
|
|
462
|
+
|
|
463
|
+
## Related Overlays
|
|
464
|
+
|
|
465
|
+
- **nodejs** - Required for TypeScript/JavaScript Pulumi programs
|
|
466
|
+
- **python** - Required for Python Pulumi programs
|
|
467
|
+
- **dotnet** - Required for C#/F# Pulumi programs
|
|
468
|
+
- **aws-cli** - AWS resource management
|
|
469
|
+
- **gcloud** - Google Cloud resource management
|
|
470
|
+
- **azure-cli** - Azure resource management
|
|
471
|
+
- **kubectl-helm** - Kubernetes management
|
|
472
|
+
- **terraform** - Alternative IaC tool
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.base.schema.json",
|
|
3
|
+
"features": {
|
|
4
|
+
"ghcr.io/devcontainers/features/pulumi:1": {
|
|
5
|
+
"version": "latest"
|
|
6
|
+
}
|
|
7
|
+
},
|
|
8
|
+
"customizations": {
|
|
9
|
+
"vscode": {
|
|
10
|
+
"extensions": ["pulumi.pulumi-lsp-client"]
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Verification script for Pulumi overlay
|
|
3
|
+
# Confirms Pulumi is installed
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
echo "🔍 Verifying Pulumi overlay..."
|
|
8
|
+
echo ""
|
|
9
|
+
|
|
10
|
+
# Check pulumi is installed
|
|
11
|
+
echo "1️⃣ Checking Pulumi CLI..."
|
|
12
|
+
if command -v pulumi &> /dev/null; then
|
|
13
|
+
pulumi version
|
|
14
|
+
echo " ✅ Pulumi CLI found"
|
|
15
|
+
else
|
|
16
|
+
echo " ❌ Pulumi CLI not found"
|
|
17
|
+
exit 1
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
# Test basic pulumi functionality
|
|
21
|
+
echo ""
|
|
22
|
+
echo "2️⃣ Testing Pulumi functionality..."
|
|
23
|
+
if pulumi about > /dev/null 2>&1; then
|
|
24
|
+
echo " ✅ Pulumi 'about' command successful"
|
|
25
|
+
else
|
|
26
|
+
echo " ❌ Pulumi 'about' command failed"
|
|
27
|
+
exit 1
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
echo ""
|
|
31
|
+
echo "✅ Pulumi overlay verification complete"
|