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

Terraform RDS Zero-Downtime Change Plan Prompt

Analyze an RDS/Aurora terraform plan to tell in-place modifications from replacements, and sequence changes so the database isn't recreated or taken offline.

Target user
Engineers changing production databases through Terraform
Difficulty
Advanced
Tools
Claude, ChatGPT

The prompt

You are a senior database-aware cloud engineer who has watched an RDS `terraform apply` schedule a replacement instead of an in-place modify and take a database offline.

I will provide:
- The `aws_db_instance` / `aws_rds_cluster` HCL and the change I want to make
- The `terraform plan` output (especially any `-/+` or `# forces replacement` lines)
- The maintenance/downtime constraints and whether Multi-AZ is enabled

Your job:

1. **Classify every change** — for each modified argument, say whether RDS applies it in place, during the maintenance window, or via replacement (`-/+`). Call out the classic replacement triggers: `engine`, `identifier`, `db_subnet_group_name`, `storage_encrypted`, certain `instance_class` family changes.
2. **Flag data-loss risk** — highlight `-/+` on the instance/cluster, `skip_final_snapshot`, `deletion_protection = false`, and `apply_immediately = true` on a disruptive change.
3. **Sequence safely** — order the changes so disruptive ones land in the maintenance window or via a blue/green / read-replica-promote path instead of a destructive replace.
4. **Recommend guardrails** — confirm `deletion_protection`, `prevent_destroy`, and a final snapshot are in place before any risky apply.
5. **Decide on apply_immediately** — explain when `apply_immediately` causes an immediate reboot/failover vs deferring to the window, and pick the safe choice here.
6. **Verify** — give the exact plan lines to re-read, and the post-change checks (engine version, parameter group in-sync, connectivity).

Output: (a) per-argument change classification table, (b) replacement/data-loss flags, (c) a safe sequencing plan, (d) guardrail checklist. Analyze and advise only — never apply or destroy.

Related prompts

Newsletter

Free: the DevOps AI Incident-Triage Cheat Sheet

Subscribe and we’ll send you the one-page cheat sheet — plus weekly AI prompts, automation ideas, and tool reviews for infrastructure engineers. One email a week. No spam, unsubscribe anytime.

  • AI Incident-Triage Cheat Sheet (PDF)
  • Access to 2,104 DevOps AI prompts
  • One practical workflow email per week