Terraform Version
Terraform Configuration Files
required_version = "= 1.8.5"
required_providers {
google = {
source = "hashicorp/google"
version = "~> 5.40.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = "= 6.40.0"
}
}
}
Debug Output
04:50:31.745 INFO terraform: Initializing the backend...
04:50:31.964 INFO terraform:
04:50:31.964 INFO terraform: Successfully configured the backend "gcs"! Terraform will automatically
04:50:31.964 INFO terraform: use this backend unless the backend configuration changes.
04:50:32.198 INFO terraform: Initializing modules...
04:50:32.201 INFO terraform: - app in modules/backend-app
04:50:32.204 INFO terraform: - app.instance_template in modules/instance_template
04:50:32.205 INFO terraform: Downloading git::https://github.com/UKGEPIC/pro-wfm-terraform-library.git?ref=v2.2 for app.mig...
04:50:33.108 INFO terraform: - app.mig in .terraform/modules/app.mig/terraform/mutable_mig/mig
04:50:33.111 INFO terraform: - bgp in modules/backend-bgp
04:50:33.143 INFO terraform: Downloading registry.terraform.io/terraform-google-modules/vm/google 12.1.0 for bgp.instance_template...
04:50:33.556 INFO terraform: - bgp.instance_template in .terraform/modules/bgp.instance_template/modules/instance_template
04:50:33.556 INFO terraform: Downloading git::https://github.com/UKGEPIC/pro-wfm-terraform-library.git?ref=v2.2 for bgp.mig...
04:50:33.572 INFO terraform: - bgp.mig in .terraform/modules/bgp.mig/terraform/mutable_mig/mig
04:50:33.577 INFO terraform: Initializing provider plugins...
04:50:33.577 INFO terraform: - Finding hashicorp/google-beta versions matching ">= 4.48.0, >= 5.36.0, 6.40.0, < 7.0.0"...
04:50:54.580 INFO terraform: - Finding hashicorp/google versions matching ">= 4.48.0, ~> 5.40.0, < 7.0.0"...
04:51:16.760 INFO terraform: - Installing hashicorp/google v5.40.0...
04:51:17.916 INFO terraform: - Installed hashicorp/google v5.40.0 (signed by HashiCorp)
04:51:17.917 ERROR terraform: ╷
04:51:17.917 ERROR terraform: │ Error: Failed to query available provider packages
04:51:17.917 ERROR terraform: │
04:51:17.917 ERROR terraform: │ Could not retrieve the list of available versions for provider
04:51:17.917 ERROR terraform: │ hashicorp/google-beta: could not query provider registry for
04:51:17.917 ERROR terraform: │ registry.terraform.io/hashicorp/google-beta: the request failed after 2
04:51:17.917 ERROR terraform: │ attempts, please try again later: Get
04:51:17.917 ERROR terraform: │ "https://registry.terraform.io/v1/providers/hashicorp/google-beta/versions":
04:51:17.917 ERROR terraform: │ net/http: request canceled while waiting for connection (Client.Timeout
04:51:17.917 ERROR terraform: │ exceeded while awaiting headers)
04:51:17.917 ERROR terraform: ╵
04:51:17.917 ERROR terraform:
04:51:17.924 INFO terraform: ::error::Terraform exited with code 1.
04:51:17.928 ERROR terraform invocation failed in ../../../../../../../.5ed4d0ea-cache/tL19rA3hW6bEEEEyXYKsT1ousn4/Wro1xOsDpOKMRwQcQ2rQ1cq513E/terraform/backend
04:51:17.928 ERROR error occurred:
* Failed to execute "terraform init -backend-config=bucket=p-pro-wfm-app-tf -backend-config=prefix=/inputs/backend/5ed4d0ea" in ../../../../../../../.5ed4d0ea-cache/tL19rA3hW6bEEEEyXYKsT1ousn4/Wro1xOsDpOKMRwQcQ2rQ1cq513E/terraform/backend
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider
│ hashicorp/google-beta: could not query provider registry for
│ registry.terraform.io/hashicorp/google-beta: the request failed after 2
│ attempts, please try again later: Get
│ "https://registry.terraform.io/v1/providers/hashicorp/google-beta/versions":
│ net/http: request canceled while waiting for connection (Client.Timeout
│ exceeded while awaiting headers)
╵
exit status 1
Expected Behavior
terraform init should successfully query and resolve all required provider versions from registry.terraform.io, including hashicorp/google-beta, within a reasonable time and without timeout errors regardless of concurrent
provider resolution.
Actual Behavior
terraform init intermittently fails with an HTTP timeout when querying the hashicorp/google-beta provider version endpoint during parallel provider resolution. The request hangs for ~44 seconds before being cancelled with:
"net/http: request canceled while waiting for connection
(Client.Timeout exceeded while awaiting headers)"
Notably, in the same terraform init run:
- hashicorp/google v5.40.0 resolves and installs successfully
- registry.terraform.io/terraform-google-modules/vm/google 12.1.0
downloads successfully
- All other external network calls succeed
The failure is specific to the hashicorp/google-beta version query endpoint
and resolves on retry, confirming it is intermittent registry-side latency
and not a persistent network issue on our end.
Steps to Reproduce
-
Create versions.tf with both hashicorp/google and hashicorp/google-beta
as required providers:
required_providers {
google = {
source = "hashicorp/google"
version = ">= 4.48.0, ~> 5.40.0, < 7.0.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 4.48.0, >= 5.36.0, 6.40.0, < 7.0.0"
}
}
-
Run terraform init on a GCP-hosted Linux amd64 runner
-
Terraform resolves both providers in parallel
-
Observe intermittently (~10-20% of runs):
- hashicorp/google resolves successfully
- hashicorp/google-beta times out after ~44 seconds
- terraform init exits with code 1
-
Re-run terraform init — succeeds on retry confirming transient issue
Additional Context
- Terraform version : 1.8.5
- Runner OS : Linux amd64
- Runner type : GCP-hosted, self-hosted, ephemeral
- Terragrunt : yes
- Frequency : Intermittent, ~10-20% of runs
- First observed : May 18, 2026
- Resolves on retry : Yes
Timeline from failed run (May 18, 2026 04:50 UTC):
04:50:33 google-beta version query started
04:50:33 google version query started (parallel)
04:50:54 google query completed (~21s)
04:51:16 google v5.40.0 installed successfully
04:51:17 google-beta FAILED after ~44s — 2 attempts exhausted
References
No response
Generative AI / LLM assisted development?
No response
Terraform Version
Terraform Configuration Files
Debug Output
Expected Behavior
terraform init should successfully query and resolve all required provider versions from registry.terraform.io, including hashicorp/google-beta, within a reasonable time and without timeout errors regardless of concurrent
provider resolution.
Actual Behavior
terraform init intermittently fails with an HTTP timeout when querying the hashicorp/google-beta provider version endpoint during parallel provider resolution. The request hangs for ~44 seconds before being cancelled with:
"net/http: request canceled while waiting for connection
(Client.Timeout exceeded while awaiting headers)"
Notably, in the same terraform init run:
downloads successfully
The failure is specific to the hashicorp/google-beta version query endpoint
and resolves on retry, confirming it is intermittent registry-side latency
and not a persistent network issue on our end.
Steps to Reproduce
Create versions.tf with both hashicorp/google and hashicorp/google-beta
as required providers:
required_providers {
google = {
source = "hashicorp/google"
version = ">= 4.48.0, ~> 5.40.0, < 7.0.0"
}
google-beta = {
source = "hashicorp/google-beta"
version = ">= 4.48.0, >= 5.36.0, 6.40.0, < 7.0.0"
}
}
Run terraform init on a GCP-hosted Linux amd64 runner
Terraform resolves both providers in parallel
Observe intermittently (~10-20% of runs):
Re-run terraform init — succeeds on retry confirming transient issue
Additional Context
Timeline from failed run (May 18, 2026 04:50 UTC):
04:50:33 google-beta version query started
04:50:33 google version query started (parallel)
04:50:54 google query completed (~21s)
04:51:16 google v5.40.0 installed successfully
04:51:17 google-beta FAILED after ~44s — 2 attempts exhausted
References
No response
Generative AI / LLM assisted development?
No response