Problem
You encounter an error similar to the one shown below during the execution of a workspace run:
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:
If you are using Terraform Enterprise (TFE):
- This limit can be increased by TFE 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
- If you are using TFE release `v202106-1` or lower you will see the option Admin named Site Admin instead within the drop-down box when clicking on your user avatar icon to the top-right of the UI
- Doubling the value to 60 is usually enough for a first increase, especially if you are getting it periodically, but depending on your workload or worker count you may need to go higher.
- This documentation shows how to access the Admin page
If you are using Terraform Cloud (TFC):
- The limitation of 30 requests per second is a global setting that applies to all customers of Terraform Cloud to prevent abuse or hogging of resources and cannot be increased.