-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot edit a google_compute_regional_network_endpoint_group in use by a google_compute_backend_service #7311
Comments
Looks like global back end service is still using your resource. Please try using |
Ah, fair point, but this leads me into what appears to be another lacuna: resource "google_compute_url_map" "testfunction" {
name = "testfunction-urlmap"
description = "url map for the testfunction site"
project = var.project
default_service = google_compute_region_backend_service.testfunction.self_link
}
resource "google_compute_health_check" "testfunction" {
name = "testfunction"
check_interval_sec = 1
timeout_sec = 1
project = var.project
tcp_health_check {
port = "80"
}
}
resource "google_compute_region_backend_service" "testfunction" {
name = "testfunction"
project = var.project
region = var.region
health_checks = [google_compute_health_check.testfunction.id]
backend {
group = google_compute_region_network_endpoint_group.testfunction.id
}
} ...fails to apply with this error:
...but if I leave out the
|
I guess the actual issue here is that This seems conceptually similar to #6876 |
An external HTTP(S) Load Balancing works with a global backend service, so I guess |
Maybe #1883 is related? |
This issue seems to have sidetracked from its initial post. I've merged a PR to address the issue @n-oden was facing in #7311 (comment) to make |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/n-oden/96e996f46203eec04fef0a3b7f9f49fa
Expected Behavior
There are two runs in play here:
First Run: creates a cloud function, and a serverless network endpoint group and load balancer (google_compute_backend_service, google_compute_url_map, google_compute_target_http_proxy, google_compute_global_forwarding_rule) linked to the cloud function.
Second run (where the failure occurs): same as the first, but with the
region
variable changed fromus-east1
tous-central1
The expected behavior would be that the regional resources (google_cloudfunctions_function, google_cloudfunctions_function_iam_member, google_compute_region_network_endpoint_group) would be deleted in
us-east1
and re-created inus-central1
Actual Behavior
Terraform fails when trying to update the google_compute_regional_network_endpoint_group:
Steps to Reproduce
terraform apply
terraform apply -var region=us-central1
The text was updated successfully, but these errors were encountered: