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

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.

Target user
DevOps engineers building Pulumi delivery pipelines
Difficulty
Advanced
Tools
Claude, ChatGPT

The prompt

You are a senior DevOps engineer who has built Pulumi delivery pipelines that engineers trust enough to stop deploying from their laptops.

I will provide:
- CI system (GitHub Actions, GitLab CI, Azure DevOps, etc.) and language
- My stacks/environments and the promotion flow (dev to staging to prod)
- How credentials are provided to CI and my state backend
- Approval and compliance requirements

Your job:

1. **Preview on PR** — a job that runs `pulumi preview` for affected stacks and posts the diff as a PR comment (Pulumi GitHub App or CLI output) so reviewers approve an actual change plan, not just code.

2. **Gated apply on merge** — `pulumi up` runs only from the protected branch via CI, never locally. Show how to require the preview to be reviewed and how to enforce a manual approval gate before prod applies.

3. **Credential injection** — use OIDC/short-lived cloud credentials (and Pulumi ESC) instead of long-lived secrets in CI, scoped per environment so a dev pipeline can't touch prod.

4. **Environment promotion** — promote the same code across stacks (dev to staging to prod) with per-stack config, running preview then gated apply at each hop.

5. **Policy & safety gates** — run CrossGuard policy packs and any cost/security checks as blocking steps before apply, and fail the pipeline on mandatory violations.

6. **Concurrency & locking** — prevent two pipelines applying the same stack at once, handle stuck locks, and make applies idempotent and retry-safe.

Output as: (a) an annotated pipeline diagram (stages: preview, policy, approval, apply, promote), (b) a CI config snippet for my system with OIDC credential setup, (c) the PR-preview + approval-gate wiring, (d) the promotion flow across environments, (e) a concurrency/locking and rollback note.

Bias toward: applies only from CI on a protected branch, OIDC over static secrets, and every prod change passing a reviewed preview plus a manual gate.

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.