Closed alfonsozamorac closed 1 week ago
FWIW, your example exactly as you have it works for me in about 1:30 (minus the explicit depends_on
, which I believe you shouldn't need, since you have implicit deps on the same resources already by using the interpolated values) and the same provider version.... maybe double-check the cloud run logs to see if that gives you any idea of what's going wrong.
In your example here, you're using the default compute service account; if you're using a different SA for the cloud run job in your actual use case, you might need to adjust the secret permissions.
(obviously, in a real world situation, you probably would want to consider managing the secret version (the actual value of the secret) outside of Terraform).
google_cloud_run_v2_service.default: Still creating... [1m30s elapsed]
google_cloud_run_v2_service.default: Creation complete after 1m33s [id=projects/xxx/locations/us-central1/services/cloudrun-service]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
I just tried recreating again and now everything works again after two days. I don't know if there was a Google issue or if it was just a one-off. The case can be closed, thank you very much for the help!
Community Note
Terraform Version & Provider Version(s)
Terraform v1.2.9 on darwin_arm64
Affected Resource(s)
google_cloud_run_v2_service
Terraform Configuration
Debug Output
│ Error: Error waiting to create Service: Error waiting for Creating Service: timeout while waiting for state to become 'done: true' (last state: 'done: false', timeout: 20m0s) │ │ with google_cloud_run_v2_service.default, │ on main.tf line 5, in resource "google_cloud_run_v2_service" "default": │ 5: resource "google_cloud_run_v2_service" "default" {
Expected Behavior
Creation complete
Actual Behavior
Timeout and unstable
Steps to reproduce
terraform apply
terraform destroy
Important Factoids
No response
References
I have followed the following example of the provider for handling secrets with Cloud Run (https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloud_run_v2_service#example-usage---cloudrunv2-service-secret) but I am getting a timeout error, and if I go to the configuration in the UI it does not get displayed and gives an error. I am also having problems when I use google_vpc_access_connector and I have a NAT that does not allow the network traffic to go out. I have a PoC that was working at least until October 18, and with the same terraform code it no longer works and all the errors are being caused by Cloud Run.