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
-
Pulumi Import of Existing Resources Prompt
Bring existing cloud resources under Pulumi management with pulumi import — generating code and adopting state — so clickops and legacy infrastructure become IaC without downtime or recreation.
-
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.
-
Pulumi Refactoring with Aliases Prompt
Refactor a Pulumi program — renaming, re-parenting, and moving resources between components — using aliases so changes update in place instead of destroying and recreating live infrastructure.
-
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.