Request limits
Preventing 429s
Users that have configurations with large numbers of similar data sources or resources, like security policies or custom rules, can occasionally see a HTTP 429 Too Many Requests
error during application.
This is because Terraform attempts to execute items in a configuration in parallel, and depending on the number of similar items you have, there is potential to hit an API call rate that exceeds thresholds set to prevent overuse of system resources.
To address this, version 4.0.0 of our Terraform provider introduced the ability to set a global request limit in your configuration file or through an environment variable. The limit puts padding between your calls, and the rest of your configuration's calls are queued and placed when the period ends.
- Configuration. Add the
request_limit
argument to theprovider
block of your configuration file, specifying seconds of padding between API requests.
provider "akamai" { request_limit = 3 }
- Environment variable. From your shell instance, specify the request limit per second using the
AKAMAI_REQUEST_LIMIT
environment variable.
export AKAMAI_REQUEST_LIMIT=3
Updated about 1 year ago