Score:0

Place different applications in Google Cloud under the same domain assigning subdomains for each one

jp flag

I'm asking an opinion or some guide for this problem. I have a couple of applications in Google Cloud Platform that I need to place under the same domain (let's call it mydomain.com), using a different subdomain for each one, like this:

  1. App 1 running on Cloud Run: mydomain.comhttps://my-first-project-5yknbkcx2a-rj.a.run.app

  2. App 2 running on Cloud Run: subdomain1.mydomain.comhttps://my-second-project-3gwpgnrz9e-rj.a.run.app

  3. App 3 running on App Engine: subdomain2.mydomain.comhttps://my-third-project.rj.r.appspot.com/

And so on...

I tried following the "Mapping custom domains" guides like this for Cloud Run and this for App Engine, but I don't understand how can I do this across multiple projects.

How can I achieve this? Should I use another Google Cloud service like Network Services > Cloud DNS and/or Network Services > Load balancing? Thanks in advance.

John Hanley avatar
cn flag
Show what you tried and the error. The domain must be verified in each project. You can then map custom domains.
Renan Baggio avatar
jp flag
Thanks for the reply. There are no error yet, I just don't understand how to make this work. If I configure my domain in a project (running an application in App Engine for example), how can I configure a subdomain of this same domain in a second project without affecting the first?
John Hanley avatar
cn flag
One subdomain does not affect another subdomain. Once you have configured something and have a problem, post a question.
Bryan L avatar
us flag
One common thing I can think of is to manage your DNS records. By assigning your "mydomain.com" as an A record and your "subdomain.mydomain.com" a CNAME for example. As I understand your question, you want to set up an alias to your primary domain with a subdomain. If you want to expound on how to manage DNS records you can check this out. https://cloud.google.com/dns/docs/records#before_you_begin
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.