Problem
Experience an error similar to the one displayed below during a workspace execution:
Error: Error accessing remote module registry
Failed to retrieve available versions for module "XXX"
(modules/base-infrastructure/main.tf:1) from app.terraform.io: error looking
up module versions: 429 Too Many Requests.
Cause
- By default, requests to the Terraform Enterprise and Terraform Cloud API from a single user or IP address are limited to 30 requests per second.
Solutions:
For Terraform Enterprise:
-
This limit can be increased by Terraform Enterprise users that are configured as site admins within the Admin > Settings > API Rate Limiting settings page.
-
This documentation shows how to access the Admin page
- For Terraform Enterprise release v202106-1 or lower the option Admin named Site Admin instead within the drop-down box when clicking on the user avatar icon to the top-right of the UI
- Doubling the value to 60 is usually enough for a first increase, especially if receiving it periodically, but depending on the workload or worker count might need to go higher.
-
This documentation shows how to access the Admin page
For Terraform Cloud:
- The limitation of 30 requests per second is a global setting that applies to all users of Terraform Cloud to prevent abuse or hogging of resources and cannot be increased.