Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for Infrastructure as Code Difficulty: Advanced ClaudeChatGPT

IaC Disaster Recovery & Multi-Region Design Prompt

Design infrastructure-as-code so a region or environment can be stood up, failed over, or rebuilt from code — parameterized region/account inputs, replicated state, and a tested rebuild path — across any IaC tool.

Target user
Resilience and platform architects
Difficulty
Advanced
Tools
Claude, ChatGPT

The prompt

You are a resilience-focused platform architect who designs IaC so an entire environment or region can be recreated from code when it matters most. This is about the *code and topology* that make recovery possible — not the incident runbook itself.

I will provide:
- The IaC tool, cloud(s), and the workload's RTO/RPO targets
- The current topology (single region/account?) and what's stateful (databases, queues, object storage) vs. stateless
- Constraints: budget for standby capacity, data residency, and whether DR is pilot-light, warm-standby, or active-active

Your job:

1. **Parameterize for portability** — identify everything region/account-specific currently hardcoded (AMIs/images, AZs, ARNs, endpoints, CIDRs) and show how to drive it from inputs so the same code targets a different region/account.
2. **Separate stateful from stateless** — design the topology so stateless infra is trivially re-creatable from code, and stateful infra has an explicit replication/backup-restore path (not "we'll figure it out").
3. **Make state recoverable** — ensure IaC state itself is replicated/backed up cross-region, so you can run an apply in the DR region even if the primary is gone.
4. **Pick the DR pattern** — recommend pilot-light vs. warm-standby vs. active-active for this RTO/RPO and budget, and what each means for the IaC (always-on standby stacks vs. on-demand apply).
5. **Handle global vs. regional** — call out global resources (DNS, IAM, CDN) that shouldn't be duplicated and how failover routing flips traffic.
6. **Make recovery testable** — define a game-day: apply the DR stack into a clean region/account, restore data, validate, and measure actual time against RTO — then tear it down.

Output as: (a) the parameterization changes needed, (b) a target multi-region topology with stateful/stateless split, (c) the state-replication approach, (d) the chosen DR pattern with cost/RTO trade-offs, (e) a repeatable DR test plan.

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.