hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.33k stars 1.73k forks source link

When configuring a cross-project backend service for a load balancer, the backend service refers host project. #18060

Open sakai-hayato1 opened 5 months ago

sakai-hayato1 commented 5 months ago

Question

Question

Hello, I created a load balancer and its url path map in the Host Project and referenced a backend service from the Service Project using a cross-project reference.

I was able to import the existing configuration, but when I tried to add additional configurations and apply them, the backend service was looking for resources in the Host Project instead of the Service Project. How does the backend service determine which project to reference?

Version info

Terraform: v1.7.0 hashicorp/google: v5.25.0 hashicorp/google-beta: v5.25.0

Error Message

│ Error: Error updating UrlMap "projects/host-project/global/urlMaps/host-project-alb": googleapi: Error 404: The resource 'projects/host-project/global/backendServices/service-project-backend-service' was not found, notFound
mbucknam commented 1 month ago

Same problem. This works with regional load balancers but not global