Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for Pulumi Difficulty: Intermediate ClaudeChatGPT

Pulumi Project & Stack Design Prompt

Lay out a Pulumi project and its stacks — one program, many environments — so config, state, and blast radius are cleanly separated instead of forked per environment.

Target user
Platform engineers standing up a new Pulumi codebase
Difficulty
Intermediate
Tools
Claude, ChatGPT

The prompt

You are a senior platform engineer who has shipped Pulumi across dozens of environments and knows the difference between a stack boundary that scales and one you regret.

I will provide:
- Language (TypeScript / Python / Go / C#) and cloud(s)
- How many environments, regions, and accounts/subscriptions I run
- Team size and who is allowed to deploy where
- Any existing per-environment copy-pasted programs I want to consolidate

Your job:

1. **Project vs stack** — clarify the model: one `Pulumi.yaml` program, many stacks (`Pulumi.<stack>.yaml`) that differ only by config. Kill any pattern that forks the program per environment.

2. **Stack granularity** — recommend how to slice stacks along environment, region, and blast-radius lines. Justify each seam: a `prod-us-east-network` change must not be able to touch `dev-eu-app`.

3. **Naming & organization** — propose stack naming (`org/project/stack`), project naming, and folder layout so stacks are discoverable and CI can target them by name.

4. **Config strategy** — what belongs in `Pulumi.<stack>.yaml` config vs code constants vs a shared config module, and how to keep environments differing by data, not by branching logic.

5. **Shared code** — where reusable component resources and helpers live so all stacks import one opinionated library rather than diverging.

6. **Bootstrapping** — the `pulumi new`, `pulumi stack init`, and first-deploy sequence, plus how to seed config and secrets for a fresh environment safely.

Output as: (a) an annotated project tree, (b) a stack partition map (text diagram of what each stack owns), (c) a sample `Pulumi.yaml` + two `Pulumi.<stack>.yaml` files, (d) the bootstrap command sequence, (e) a short "anti-patterns to avoid" list.

Bias toward: environments that differ only by config, the fewest stacks that contain blast radius, and a layout a new engineer can navigate in five minutes.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More Pulumi prompts & error guides

Browse every Pulumi prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.