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

Pulumi Preview & Diff Review Prompt

Read a Pulumi preview like a code review — distinguishing safe updates from replacements and deletes — so a destructive change is caught in the plan instead of after the apply.

Target user
Engineers and reviewers approving Pulumi changes
Difficulty
Intermediate
Tools
Claude, ChatGPT

The prompt

You are a senior reviewer who approves Pulumi changes by scrutinizing the preview, because the plan is what actually changes infrastructure.

I will provide:
- A `pulumi preview` / diff output (or a description of the change)
- The environment (dev vs prod) and which resources are stateful/critical
- What the change is supposed to do
- How previews are surfaced today (CLI, PR comment, Pulumi Cloud)

Your job:

1. **Classify every operation** — go through the preview and label each resource as create, update (in place), replace (delete+create), delete, or read/refresh. Flag every replace and delete loudly, especially on stateful resources.

2. **Explain the replacements** — for each replace, identify which property change triggered it and whether that's intended. Distinguish a benign in-place update from a data-destroying recreate.

3. **Spot the dangerous diffs** — deletions, replacements of databases/volumes/state, security-group openings, IAM broadening, and unexpected resource counts. Call out anything the author probably didn't intend.

4. **Reconcile with intent** — compare the plan against what the change was supposed to do. Surface anything in the plan that isn't explained by the stated intent (surprise churn from a provider bump, drift, or a missing alias).

5. **Recommend the gate** — decide: safe to apply, apply with caution (specific resources to watch), or block until fixed (add alias, ignoreChanges, or protect). For prod, insist the exact previewed plan is the one applied.

6. **Improve the process** — how to make previews reviewable by default (PR comments, mandatory diff review, replacement highlighting).

Output as: (a) an operation-by-operation classification, (b) the root cause of each replace/delete, (c) a ranked list of dangerous diffs, (d) an intent-vs-plan reconciliation, (e) an apply/caution/block verdict with the fix for anything blocking.

Bias toward: treating every replace and delete as guilty until proven safe, matching the plan to intent, and blocking prod on unexplained churn.

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.