Today’s error of the week is linked to the following Terraform issue:
│ Error: Failed to query available provider packages │ │ Could not retrieve the list of available versions for provider hashicorp/google: could not connect to registry.terraform.io: Failed to request │ discovery document: Get "https://registry.terraform.io/.well-known/terraform.json": net/http: request canceled while waiting for connection │ (Client.Timeout exceeded while awaiting headers)
As for the solution, mostly it comes down to a networking DNS, or a cache issue. So, try the following:
- Check and update your DNS settings. Try adding Google’s and Cloudflare’s DNS servers:
- Reconnect to your internet connection.
- Try using a VPN instead.
disable_checkpoint = truein your
- Clear Terraform cache:
rm -rf .terraformthen rerun
When nothing works, feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.