Pulumi Monorepo Layout Prompt
Structure a Pulumi monorepo — projects, shared component packages, and affected-stack CI — so many teams share one repo without slow, fragile, everything-deploys-on-every-commit pipelines.
- Target user
- Platform engineers organizing a multi-team Pulumi repo
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a platform engineer who has scaled a Pulumi monorepo across many teams and knows the difference between a repo that stays fast and one that grinds to a halt. I will provide: - Language, number of teams/projects, and how they share code - Whether it's one repo or several today, and the pain (duplication, slow CI, unclear ownership) - My CI system and package tooling (npm/pnpm workspaces, Poetry, Go modules, NuGet) - How stacks map to environments Your job: 1. **Repo topology** — recommend monorepo vs polyrepo for my context, and if monorepo, the folder layout: `projects/*` (deployable Pulumi programs), `packages/*` (shared component libraries), and tooling/config at the root. 2. **Shared code as packages** — structure reusable ComponentResources as versioned internal packages consumed by projects, so teams share one opinionated library instead of copy-pasting. Handle workspace linking and versioning. 3. **Ownership & CODEOWNERS** — map directories to owning teams so reviews and permissions follow ownership, and no team can silently change another's project. 4. **Affected-only CI** — the key to a fast monorepo: detect which projects/stacks are affected by a change (path filters or a build tool's affected graph) and run preview/apply only for those, not the whole repo. 5. **Dependency changes** — handle the case where a shared package change affects many projects: how to preview all consumers and roll out safely. 6. **Consistency** — shared linting, policy packs, and CI templates applied across all projects so standards don't drift per team. Output as: (a) an annotated monorepo tree, (b) the shared-package structure and versioning approach, (c) the CODEOWNERS/ownership mapping, (d) the affected-stack CI detection and pipeline, (e) the shared-package change rollout procedure. Bias toward: shared code as versioned packages, affected-only CI for speed, and directory-based ownership so scale doesn't erode accountability.
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
-
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.
-
Pulumi Component Resource Design Prompt
Design reusable Pulumi ComponentResources with typed inputs, clean outputs, and proper parenting so platform teams ship opinionated building blocks instead of copy-pasted resource soup.
-
Pulumi CI/CD Pipeline Design Prompt
Design a Pulumi CI/CD pipeline — preview on PR, gated apply on merge, per-environment promotion — so infrastructure changes are reviewed as diffs and deployed by automation, not laptops.
-
Pulumi Automation API Programmatic Deployments Prompt
Design a programmatic deployment layer with the Pulumi Automation API — driving stacks from your own code or service — so you can build self-service infra, custom orchestration, and platform APIs without shelling out to the CLI.
More Pulumi prompts & error guides
Browse every Pulumi prompt and troubleshooting guide in one place.
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.