Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Global Application Load Balancer in the host project to a Cloud RUN in the service project

Google Released the Preview feature on July 11th 

Global external Application Load Balancers now support Shared VPC configurations where the load balancer's forwarding rule, target proxy, and URL map, can be created in a host or service project, while the backend services and backends can be distributed across multiple service projects in the Shared VPC environment. This is referred to as cross-project service referencing.

I'm trying it out so, I've create a host and service project and in the service project deployed the hello cloud run container.

No combination of configurations that I've tried allow me to have a Global Load balancer in the host project connect to a backend service in the service project. 

The error message

ERROR: (gcloud.beta.compute.url-maps.create) Could not fetch resource:

- Invalid value for field 'resource.defaultService': '.../beta/projects/mike-service/global/backendServices/bes-hello'. Cross-project references for this resource are not allowed.

Is it just not supported? or does someone have a example of this working? 

1 2 2,072
2 REPLIES 2

Hi @Mike-Seddi , 

Based from the description of your issue, it seems you are referring to this documentation. (Regarding cross-project service referencing.) This should be supported as stated from the documentation.

If you are encountering the error that you stated :


@Mike-Seddi wrote:

ERROR: (gcloud.beta.compute.url-maps.create) Could not fetch resource:

- Invalid value for field 'resource.defaultService': '.../beta/projects/mike-service/global/backendServices/bes-hello'. Cross-project references for this resource are not allowed.

 


This error message tells us that there's a problem with the defaultService field's configuration in the URL map during the execution of the gcloud beta compute url-maps create. The error specifically points out that the value supplied for the defaultService field is not valid.

You can try this troubleshooting steps :
1. Verify the defaultServicevalue: Make certain that you have designated a valid backend service as the defaultService for the URL map. The backend service must be appropriately configured and present in the designated service project within the Shared VPC environment.
2. Make sure that both the host project and service project possess the necessary permissions to communicate and access resources across the Shared VPC network. Appropriate IAM permissions are essential for cross-project service referencing.
3. Double-check the syntax of the gcloud beta compute url-maps create command to ensure it is correct or free of typos or errors. 
4. Make sure you are utilizing the appropriate version of the gcloud command-line tool. Since the error message indicates gcloud.beta.compute.url-maps.create, confirm that you are using the beta version of the gcloud tool by executing gcloud components install beta and gcloud beta --help to double check if the command is available.
5. Verify that there are no naming conflicts or overlapping configurations in either the host or service project that could trigger the error.

If this will not work, I recommend you to coordinate and contact GCP Support as the will further check on your project and setup. 

Hi folks,

To anybody looking for an update to this, I also ran into this exact issue. Upon contacting GCP Support, I was told that cross-project referencing for global external load balancers has been rolled back and is not currently available. The feature is still planned, but does not have a new ETA for beta availability. Looks like at the time of this writing, the only thing to do is wait.