Terraform "RequestError: send request failed" in CI
The provider tried to call a cloud API but the HTTP request never completed -- a dropped connection, DNS resolution failure, or TLS handshake error -- so no service-side response was received.
What this error means
apply/plan fails with "RequestError: send request failed" wrapping a network cause (connection reset, i/o timeout, no such host, EOF). It is typically transient and clears on retry from a healthy network.
Error: reading S3 Bucket (assets): operation error S3: HeadBucket,
exceeded maximum number of attempts, 3, RequestError: send request failed
caused by: Post "https://sts.amazonaws.com/": dial tcp: lookup sts.amazonaws.com:
no such hostCommon causes
Transient network/DNS/TLS failure
A dropped connection, flaky DNS, or interrupted TLS handshake between the runner and the API endpoint aborts the request.
Egress restriction or proxy issue
A misconfigured proxy, firewall, or VPC endpoint can block or reset connections to the cloud API.
How to fix it
Retry, and confirm egress is healthy
Re-run the command; if it persists, verify the runner can resolve and reach the API endpoint.
nslookup sts.amazonaws.com
curl -sS -o /dev/null -w '%{http_code}\n' https://sts.amazonaws.com/
terraform apply -input=falseFix persistent connectivity
- Confirm proxy/HTTPS_PROXY settings are correct for the runner.
- Verify firewall/VPC-endpoint rules allow egress to the API hostnames.
- Check DNS resolution from the runner if "no such host" recurs.
How to prevent it
- Ensure runners have stable egress and DNS to cloud API endpoints.
- Configure proxies/VPC endpoints correctly for provider traffic.
- Run apply on a platform that auto-retries transient network failures.