For example, there are the following applications deployed as App Engine and Cloud Run services.
A) app-1-api
as Cloud Run service
B) app-2-api
as App Engine service
C) app-1-frontend
a NextJS app as Cloud Run service
D) app-2-frontend
a static website hosted as Cloud Run service
I found an article that describes how serverless NEGs with Google Cloud Balancer can glue all these services together behind a single domain. I would like to achieve the following routing:
A request to
api.example.com
should hit serviceA
A request to
reporting-api.example.com
should hit serviceB
A request to
reporting.example.com
should hit serviceD
If a request matches the path
*.example.com
and none of the paths 1 - 3, then the request should hit serviceC
.
I haven't found anything in regards to the wildcard subdomain in 4. Is all this possible? If not, what GCP alternatives are there?
Thank you.