GuideReference
TrainingSupportCommunity

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 sets the number of calls per second.

  • Configuration. Add the request_limit argument to the provider block of your configuration file, specifying the number of calls per second.

    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