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.
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
-
Terraform Module Deprecation Path Prompt
Plan a non-breaking migration when a published Terraform module's interface or behavior must change, so existing consumers can upgrade gradually.
-
Terraform Core Version Upgrade Prompt
Plan a safe upgrade of the Terraform CLI/core version across many stacks — required_version constraints, deprecation handling, state compatibility, and a staged rollout that won't strand teams.
-
Terraform Blue Green Deployment Pattern Prompt
Implement blue/green infrastructure deployments in Terraform with parallel resource sets, create_before_destroy, and weighted DNS or target-group cutover with rollback.
-
Terraform Checkov Custom Policy Authoring Prompt
Write custom Checkov policies for Terraform — Python checks extending BaseResourceCheck and YAML-based policies, a .checkov.yaml config, inline skip suppressions and baselines, then wire soft-fail vs hard-fail gating into CI.
More Terraform prompts & error guides
Browse every Terraform prompt and troubleshooting guide in one place.
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.