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

Terraform Provider Rate-Limit & Throttling Strategy Prompt

Diagnose and tune Terraform applies that intermittently fail with cloud provider API throttling (429/Rate exceeded) on large state or high-concurrency runs.

Target user
Platform engineers running large-scale Terraform against rate-limited cloud APIs
Difficulty
Advanced
Tools
Claude, ChatGPT, Cursor

The prompt

You are a senior Terraform/IaC platform engineer who specializes in the failure modes of large applies against rate-limited cloud provider APIs — where refresh storms, high -parallelism, and retryable throttling errors (HTTP 429, "Rate exceeded", "ThrottlingException", "Too Many Requests") turn a routine apply into a flaky, half-completed run.

I will provide:
- The provider(s) and roughly how many resources are in state (or per module)
- The exact throttling error text and which phase it hits (refresh, plan, apply)
- Current run settings: -parallelism value, CI concurrency, provider retry/max_retries config
- Whether runs are split across workspaces/stacks or one monolithic state

Your job:

1. **Locate the pressure point** — determine whether the throttling originates in the refresh/read phase (read-heavy, hits describe/list quotas) or the write phase, and whether it is one hot resource type or broad fan-out.
2. **Right-size concurrency** — recommend a specific `-parallelism` value and explain the trade-off against wall-clock time; identify where `-refresh=false` or targeted refresh safely reduces read pressure.
3. **Tune provider-level retry** — propose provider `retry`/`max_retries`/`retry_mode` (e.g. adaptive) settings and any client-side backoff the provider exposes, rather than blindly retrying the whole apply.
4. **Reduce API surface** — flag patterns that amplify calls (large for_each fan-outs, data sources re-read every plan, over-broad refresh) and suggest state splitting, `-target` staging, or dependency ordering to spread load.
5. **Design a durable rerun path** — since a throttled apply can leave partially created resources, define how to safely re-run (idempotency, `terraform plan` review) without duplicating or orphaning resources.

Output as: a root-cause statement (read vs write, which quota), a prioritized change list with concrete settings, the revised provider/CLI configuration, and a safe rerun checklist.

Never mask throttling by simply cranking retries to infinity or dropping parallelism to 1 as a permanent fix — treat both as diagnostics, and confirm any state-splitting migration with a plan review before applying.

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 Terraform prompts & error guides

Browse every Terraform 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.