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?
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
, whereTAG
refers to the traffic tag for the revision that you are requesting, andSERVICE_IDENTIFIER
is a stable and unique identifier for a Cloud Run service. Do not parse theSERVICE_IDENTIFIER
as it does not have a fixed format, and the logic forSERVICE_IDENTIFIER
generation is subject to change.
As of August 2024 Cloud Run can now also use deterministic URLs in addition to the ones containing the project hash as mentioned in previous answers.
As per the official docs the deterministic URL will be of the form https://[TAG---]SERVICE_NAME-PROJECT_NUMBER.REGION.run.app
Where
TAG
is the optional traffic tag for the revision that you are requesting.PROJECT_NUMBER
is the Google Cloud project number.SERVICE_NAME
is the name of the Cloud Run service.REGION
is the name of the region, such as us-central1.
Note there are some caveats in that the [TAG---]SERVICE_NAME-PROJECT_NUMBER
label must be no more than 63 characters. If you are not using a TAG
then this should always be the case even with a maximum length SERVICE_NAME
© 2022 - 2024 — McMap. All rights reserved.
projectHash
always gonna be there even if theserviceName
is globally unique? – Sparid