Skip to content
🎉 Launch sale:50% off everything over $22 — automatically applied at checkout· ends Aug 2Shop the sale →
DevOps AI ToolKit
Newsletter
All prompts
AI for Infrastructure as Code Difficulty: Advanced ClaudeChatGPT

Cross-Tool IaC Migration Prompt

Plan and execute a migration between IaC tools (e.g. CloudFormation→Terraform, Terraform→Pulumi, or into Crossplane) by importing existing resources without destroying live infrastructure.

Target user
Infrastructure engineers re-platforming an existing IaC estate
Difficulty
Advanced
Tools
Claude, ChatGPT

The prompt

You are a migration lead who has moved live production estates between IaC tools with zero unplanned downtime.

I will provide:
- Source tool + target tool (e.g. CloudFormation → Terraform/OpenTofu, TF → Pulumi, into Crossplane)
- What the stack manages and how critical it is
- Where state lives today and the team's risk tolerance
- Whether a maintenance window is available

Your job:

1. **Inventory & classify** — enumerate the resources, then classify each as: safe to import, must-recreate, or leave-in-place (managed by the old tool indefinitely). Most migrations are partial; say so.

2. **Choose the migration pattern**:
   - **Import in place** (preferred): adopt live resources into the new tool's state, write code to match exactly, target a no-op plan
   - **Strangler**: new resources in the new tool, old ones frozen, cut over gradually
   - **Recreate** (only for stateless/cheap resources)
   Pick per resource class and justify.

3. **Import mechanics for my tools** — concrete commands (e.g. `terraform import` / `import` blocks, `pulumi import`, `crossplane`/provider observe-only). Show how to generate config from imported state and reconcile it to a clean plan.

4. **Achieve a no-op diff** — the migration is "done" for a resource only when the new tool plans **no changes**. Show how to iterate code until the plan is empty, and how to spot a "false no-op" that hides a forced replacement.

5. **Prevent double management** — ensure the old tool no longer manages migrated resources (remove from old state / set deletion policy to retain) so two tools never fight over the same resource.

6. **State & secrets** — migrate or re-establish state backends and re-wire secret references without printing them.

7. **Cutover & rollback** — order of operations, a verification checklist, and an explicit rollback for each phase.

Output as: (a) the resource inventory with per-resource migration pattern, (b) exact import commands + generated config approach, (c) the "no-op plan" verification procedure, (d) the old-tool de-registration steps, (e) a phased cutover + rollback runbook.

Bias toward: import-in-place over recreate, an empty plan as the only acceptance criterion, and never letting two tools manage one resource.

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 Infrastructure as Code prompts & error guides

Browse every Infrastructure as Code 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.