Closed mflis-sumo closed 6 months ago
This is a major problem as every version past 3.7.0 is not usable for any organisation that manages a few thousand resources via Terraform.
I'm still getting rate limited with the uptimerobot_monitor
resources. I'm having 5 of these resources in my Terraform config. When I do two runs after another, the second one will pretty much always get rate limited.
In the logs I can see that this request is getting 429 responses: POST https://api.uptimerobot.com/v2/getMonitors
My setup: Terraform version: 1.8.0 PagerDuty Provider version: 3.11.3
Terraform Version
Terraform v1.5.4
Affected Resource(s)
Expected Behavior
PagerDuty should gracefully handle the HTTP 429 response from PD API by waiting some time and retrying the request.
Actual Behavior
After upgrading the PD provider version to 3.8.1 I've noticed that TF
plan
andapply
started receiving errors like this one:Steps to Reproduce
Either try to run many requests to PD API in a short time to exhaust your rate limit or prepare mitm script to reproduce HTTP 429 response. Below I'll describe the approach with mitmproxy as it's deterministic.
class RateLimitResponse: def init(self): self.counter = 0
addons = [RateLimitResponse()]
2024-02-23T14:27:27.471+0100 [INFO] provider.terraform-provider-pagerduty_v3.6.0: Rate limit hit, throttling by 33.6 seconds until next retry to GET: https://api.pagerduty.com/abilities: timestamp=2024-02-23T14:27:27.471+0100