We have an application hosted on AppEngine Flexible. It has multiple versions, primarily a master release and a staging develop version.
The master version has a domain pointed to it, but we can't find a way of pointing a subdomain to the other version, so the only URL is has is like "develop-dot-appname-1234.appspot.com"
We'd like "appname.com" for the master version and "beta.appname.com" for the develop version.
Hello,
Each version of App Engine is made of a URL in this fashion[1].
https://[VERSION_ID]-dot-[SERVICE_ID]-dot-[MY_PROJECT_ID].appspot.com.
To make a “subdomain” using this format is to create a separate service and deploy it there. Of course, there are different ways of doing so, namely using the gcloud command[2] with the service names but others in the community have found a different approach as seen here[3].
There is also a dispatch file, where you use mappings in that file to point to a custom url[4].
There is a main document here[5], which tells how to map versions and services in many ways, namely mentioned URL or a dispatch file.
[1] https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed#urls
[4] https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed#dispatch
[5] https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed
We don't need many ways of doing it, just one, but there doesn't appear to be mapping of versions to subdomains, only services.
We have 1 service (default) and 2 versions (a, b). We want "a.appname.com" and "b.appname.com".
The only possibility I can think of from the above documentation is that we should deploy a service for each version with the name of that version, so that version "a" has service "a" and version "b" has service "b". I don't know if this causes other issues however.