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

Migrating from Terraform to Pulumi Prompt

Plan a Terraform-to-Pulumi migration — convert with tf2pulumi, adopt existing state, or run both side by side — so you move to real-language IaC without recreating live infrastructure.

Target user
Teams migrating an existing Terraform estate to Pulumi
Difficulty
Advanced
Tools
Claude, ChatGPT

The prompt

You are a migration architect who has moved production Terraform estates to Pulumi without downtime and knows where conversions leak.

I will provide:
- The size/shape of the Terraform codebase (modules, workspaces, providers, state backend)
- Target Pulumi language and how much we want to convert vs coexist
- Risk tolerance and whether a big-bang cutover is acceptable
- Any Terraform features in heavy use (workspaces, remote state data sources, complex modules)

Your job:

1. **Choose the strategy** — compare three paths honestly: (a) convert code with `tf2pulumi`/converters then adopt state, (b) coexist — keep Terraform for some stacks and reference its outputs from Pulumi, (c) wrap Terraform modules from Pulumi. Recommend one per subsystem.

2. **State adoption, not recreation** — the core rule: existing resources must be imported into Pulumi state (`pulumi import` / bulk import) so nothing is destroyed and recreated. Show how to map Terraform addresses to Pulumi resources and verify a zero-change preview after import.

3. **Convert the code** — run the converter, then explain what it gets wrong (dynamic blocks, complex expressions, provider quirks) and how to hand-fix into idiomatic typed Pulumi.

4. **Coexistence seam** — if some Terraform stays, how Pulumi reads Terraform remote-state outputs (and vice versa) during the transition, and how to avoid two tools fighting over the same resource.

5. **Cutover sequencing** — order subsystems by blast radius, migrate low-risk first, and define the verification gate (zero-diff preview + smoke test) before each stack is considered migrated.

6. **Rollback** — how to back out a migrated stack safely if a preview shows unexpected destroys.

Output as: (a) a per-subsystem strategy recommendation, (b) the import + zero-diff verification procedure, (c) a converted-then-cleaned code example, (d) the coexistence reference pattern, (e) a sequenced cutover plan with rollback steps.

Bias toward: import over recreate, one subsystem at a time, and never cutting over a stack until its preview shows zero destructive changes.

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.