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.
Related prompts
-
IaC State Backup, Recovery & Import Prompt
Design backup, locking, recovery, and resource-import runbooks for IaC state (Terraform/OpenTofu/Pulumi) so a corrupted, lost, or out-of-band-modified state doesn't become an outage.
-
Multi-Environment IaC Promotion Pipeline Prompt
Design a dev → stage → prod promotion pipeline for infrastructure where the same code ships to every environment, differences live in config, and prod changes are reviewed, gated, and reversible.