What is the format of Cloud Run service URLs?

Viewed 870

The documentation gives an example of https://gateway-12345-uc.a.run.app as a service URL. Do Cloud Run service URLs always have the -uc.a.run.app suffix, or is this subject to change in the future?

2 Answers

The pattern is the following

https://<serviceName>-<projectHash>-<region>.run.app

Where

  • ServiceName is the provided name of your service
  • projectHash is generated by the Platform. You can't know it before the first deployment. SHOULD never change, but sometime (and I don't know the reason, and it's just a caveats from Google) it can change in a different region
  • region: is the region where you deployed. uc.a stand for us-central1. I have service in europe-west1 -> ew.a. I don't know the other region extensions, but deploy over there and you can easily find them.

As of August 2022,

From the Official Documentation -

The URL for a Cloud Run service has the format https://[TAG---]SERVICE_IDENTIFIER.run.app, where TAG refers to the traffic tag for the revision that you are requesting, and SERVICE_IDENTIFIER is a stable and unique identifier for a Cloud Run service. Do not parse the SERVICE_IDENTIFIER as it does not have a fixed format, and the logic for SERVICE_IDENTIFIER generation is subject to change.

Related