Retry Terraform state requests on 429

This MR makes the component retry Terraform state requests when GitLab returns 429.

Job tokens sent as basic auth now count against the pipeline user's authenticated API rate limit. This project's integration tests make a burst of state requests and hit that limit. Tofu retries only twice by default, and the plain curl calls on the state API don't retry at all, so a single 429 fails the job.

It raises the default for TF_HTTP_RETRY_MAX to 5 and adds --retry 5 to the curl calls on the state API. curl honors the Retry-After header GitLab sends on a 429, so the retries land in the next rate-limit window.

References

Merge request reports

Loading
Loading