Search code examples
google-cloud-run

How are Cloud Run URLs generated?


I would like to know if cloud run URLs are generated in a deterministic way. I want to know if it's possible to know the URL before deployment.

Cloud Run domain mapping is not supported in many of the regions I use. I can use the API after deployment to get the URL which it seems like I will wind up having to do, but it would still be nice to know how the URLs are generated.

I deployed the same app/container to multiple regions. Here is an example of 2 URLs:

"https://myapp-123yla7opz-uw.a.run.app"
"https://myapp-123yla7opz-ue.a.run.app"

How is 123yla7opz being generated? Is that a known algorithm google uses? Is it generated from the cloud run app name or container name/hash or something?


Solution

  • Posting the answer if someone needs it later

    It's a uniq hash which is linked to the project but unfortunately there is no way to predict it before hands. Your best bet is using the API to get the generated URL.