Skip to content

feat(article): adaptive retry mode terraform - #160

Open
oycyc wants to merge 20 commits into
mainfrom
feat/adaptive-retry-mode-terraform
Open

feat(article): adaptive retry mode terraform#160
oycyc wants to merge 20 commits into
mainfrom
feat/adaptive-retry-mode-terraform

Conversation

@oycyc

@oycyc oycyc commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

https://deploy-preview-160--masterpoint.netlify.app/blog/aws-adaptive-retry-mode-terraform-throttled-api-requests/
image

Summary by CodeRabbit

Summary by CodeRabbit

  • Documentation
    • Added a blog post on using AWS SDK adaptive retry mode with the Terraform AWS provider.
    • Explains adaptive retry pacing, max_retries, and -parallelism considerations for throttled API requests.
    • Includes provider configuration and scoping guidance, with cautions against enabling adaptive mode broadly.

@oycyc
oycyc requested a review from a team as a code owner July 27, 2026 03:36
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds a blog post that explains AWS adaptive retry mode, compares it with standard retries, and documents scoped Terraform provider configuration for throttled API requests.

Changes

AWS adaptive retry mode article

Layer / File(s) Summary
Retry mode behavior and comparison
content/blog/2026-07-26-aws-adaptive-retry-mode-terraform-throttled-api-requests.md
Adds article metadata, navigation, and explanations of standard retries, adaptive pacing, max_retries, and Terraform parallelism.
Terraform provider configuration and scoping
content/blog/2026-07-26-aws-adaptive-retry-mode-terraform-throttled-api-requests.md
Documents retry_mode = "adaptive", provider aliases, child-module configuration, and limits on universal enablement.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding an article about adaptive retry mode for Terraform.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/adaptive-retry-mode-terraform

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@content/blog/2026-07-26-aws-adaptive-retry-mode-terraform-throttled-api-requests.md`:
- Line 83: Update the module provider guidance near the providers mapping to
explain that it applies only to modules using the default aws provider; instruct
callers to pass matching aliased provider keys and require child modules to
declare those aliases via configuration_aliases before reuse.
- Around line 36-40: Reframe the adaptive retry recommendation around a client
targeting one specific resource or API workload, rather than presenting a broad
Terraform run as a direct fit. Update the examples in the discussion around IAM,
ALB listener rules, and Route 53 to acknowledge that these span multiple
resources and may cause adaptive throttling to affect unrelated requests; narrow
the recommendation before suggesting providers that fan out across resource
families.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8579b199-ec9d-473f-9b17-d4973f99f485

📥 Commits

Reviewing files that changed from the base of the PR and between 488e5ab and dfa3284.

⛔ Files ignored due to path filters (1)
  • static/img/updates/aws-adaptive-retry-mode-terraform/aws-adaptive-retry-mode.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • content/blog/2026-07-26-aws-adaptive-retry-mode-terraform-throttled-api-requests.md

@netlify

netlify Bot commented Jul 27, 2026

Copy link
Copy Markdown

Deploy Preview for masterpoint ready!

Name Link
🔨 Latest commit 63ede98
🔍 Latest deploy log https://app.netlify.com/projects/masterpoint/deploys/6a75b28cb37d7e0008b23c7a
😎 Deploy Preview https://deploy-preview-160--masterpoint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 34
Accessibility: 89
Best Practices: 92
SEO: 79
PWA: 70
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@content/blog/2026-07-26-aws-adaptive-retry-mode-terraform-throttled-api-requests.md`:
- Line 90: In the closing example, update the phrase “multiple quick ones that
bounces” to use the grammatically correct “multiple quick ones that bounce,”
leaving the surrounding explanation unchanged.
- Around line 31-39: Reframe the adaptive-mode recommendation to apply only to
isolated AWS SDK client configurations targeting a single resource or workload.
Update the IAM, ALB, and Route 53 examples to clarify that broad Terraform runs
and provider aliases do not necessarily map to one client per resource, and
remove any implication that throttling impact is limited exactly to the selected
resources.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2cf52c1d-f22b-4e6c-af3e-dc37fefab05f

📥 Commits

Reviewing files that changed from the base of the PR and between 536bf28 and 5ac3530.

📒 Files selected for processing (1)
  • content/blog/2026-07-26-aws-adaptive-retry-mode-terraform-throttled-api-requests.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@content/blog/2026-07-26-aws-adaptive-retry-mode-terraform-throttled-api-requests.md`:
- Line 56: Remove the stray underscore in the prose sentence so it reads “be
able to easily see,” preserving the surrounding Markdown and all other content.
- Around line 32-40: Revise the adaptive-mode recommendation in the paragraph
beginning “A big Terraform operation” to scope it to a single AWS SDK client
targeting one resource or API operation, rather than a broad Terraform run
spanning IAM, ALB, and Route 53. Replace “fits that description well” and the
related broad resource-selection wording with narrower client-scoped language,
and avoid implying that provider aliases guarantee separate SDK clients.
- Line 95: Rephrase the adaptive retry latency discussion in the paragraph
beginning “The important nuance” to acknowledge that throttling can delay
initial requests, rather than calling slower behavior a non-issue. Present the
delay as an acceptable trade-off for latency-tolerant workloads or narrowly
scoped resources where avoiding repeated throttled attempts is more important.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 405006f7-ee55-4c4d-b2ea-4325c510470e

📥 Commits

Reviewing files that changed from the base of the PR and between 5ac3530 and c8d8e3c.

📒 Files selected for processing (1)
  • content/blog/2026-07-26-aws-adaptive-retry-mode-terraform-throttled-api-requests.md


This is because there are costs. **Typical operations get slower**, since delaying first attempts is the mechanism itself, so a Terraform or OpenTofu workspace that never gets throttled gains nothing and may still pay a latency cost after a transient blip. And that per-client rate limiter is **shared across operations**, so one throttle-prone API surface slows every call the client makes, including ones that were never in trouble (hence the provider aliases above).

The important nuance is that these costs only exist where requests were succeeding in the first place. For resources that are actually being throttled, "slower" is a non-issue because it wasn't going through anyway and cycling through `Rate exceeded` errors has no latency worth protecting. A **paced request that succeeds beats multiple quick ones that bounce**, so scope it to resources where throttling is expected, where you give up no real speed because standard retries were already getting throttled.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the message is pretty straightforward, I still feel like a short summary is missing. Without it, it feels like we drop a reader in the middle of a conversation.
Maybe something like:

The practical rule is simple: keep standard mode by default, and use adaptive mode where throttling is expected and repeatable. A paced request that succeeds is better than a burst of fast requests that AWS rejects.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. The ending was not succinct enough. I like yours. Let's update.

Suggested change
The important nuance is that these costs only exist where requests were succeeding in the first place. For resources that are actually being throttled, "slower" is a non-issue because it wasn't going through anyway and cycling through `Rate exceeded` errors has no latency worth protecting. A **paced request that succeeds beats multiple quick ones that bounce**, so scope it to resources where throttling is expected, where you give up no real speed because standard retries were already getting throttled.
We have a practical rule at Masterpoint that is simple: keep the standard mode by default, and use adaptive retry mode where throttling occurs or is expected (Route53, we're looking at you). A paced request that succeeds is better than a burst of fast requests that AWS rejects.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Route53, we're looking at you

Haha, I like it!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Gowiem I didn't fully remove the paragraph "The important nuance is that...", but I edited it to preserve the reasoning.

@gberenice
gberenice force-pushed the feat/adaptive-retry-mode-terraform branch from 482436f to a0dc5d1 Compare August 7, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants