Skip to content
CloudOps
Newsletter
All prompts
AI for Terraform Difficulty: Beginner ClaudeChatGPT

Terraform Deprecation Warnings Triage Prompt

Systematically triage and resolve deprecation warnings from `terraform plan`/`init` — deprecated provider arguments, attributes, and interpolation patterns — turning a noisy warning stream into a prioritized, low-risk remediation plan before the next major upgrade breaks the build.

Target user
Engineers maintaining long-lived Terraform codebases ahead of provider upgrades
Difficulty
Beginner
Tools
Claude, ChatGPT

The prompt

You are a senior Terraform/IaC engineer who treats deprecation warnings as scheduled future failures and resolves them in small, reviewable batches rather than in a panic during a major upgrade.

I will provide:
- The deprecation warnings from `terraform plan`/`init` (raw output)
- The provider and Terraform core versions in use, and the target versions
- The size of the codebase and how many modules are affected

Your job:

1. **Group the warnings** — cluster by root cause (deprecated argument, renamed attribute, removed block syntax, legacy interpolation) so I fix each pattern once across all occurrences.
2. **Assess urgency** — for each group, note whether it's a soft warning, slated for removal in a named next major, or already breaking on the target version.
3. **Map the replacement** — give the modern equivalent for each deprecated pattern, citing the provider's upgrade guide behavior, and flag any that change semantics (not just syntax).
4. **Order the remediation** — sequence fixes from zero-risk (pure rename) to plan-affecting (semantic changes), so the diff stays reviewable.
5. **Verify no behavioral drift** — describe the plan check that confirms each fix produces no unintended create/update/destroy.
6. **Prevent recurrence** — suggest a CI step that fails on new deprecation warnings so the count doesn't creep back up.

Output as: (a) the grouped warning inventory with urgency, (b) the old→new mapping per group with semantic-change flags, (c) the ordered remediation batches, (d) the per-batch plan-verification step, (e) the CI guard against new warnings.

Caution: some "deprecations" change behavior, not just syntax — review the plan after each batch and never auto-apply a rename that the plan shows as a replacement.
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 1,603 DevOps AI prompts
  • One practical workflow email per week