3

I'm Building a multisite enviromment to allow my clients to build their websites (like a wix builder). I already have it working on a single VM but I want to use cloud run to scale this better.

The question is: How I can connect programmaticaly my clients domains to cloud run and generate a ssl certificate? There is another better way to do this?

The only solution that a think until now is to use a VM like a entry point, making the ssl part and the connection with the cloud run service, but it seams like a "ugly" option.

I apreciate any help I can get.

1 Answers1

2

On cloud run's native way (mapping domains) it is not possible since you need to validate the ownership of your domain.

In this document is mentioned:

"You must verify domain ownership the first time you use that domain in the Google Cloud project"

If some customer has this domain mapped to another GCP project this domain can't be added to cloud run until after you unlink the domain in the another project, I'm not sure that the domain validation could be automated.

The approach of the VM is not bad at all, another alternative is to use Cloud Run for Anthos on Google Cloud and map your customer's domains to the IP of the load balancer.

Jan Hernandez
  • 223
  • 1
  • 7
  • 1
    thanks to your reply JAHDZP. I passed all day looking for an alternative but the best for now is the VM. In the past I already did an solution for auto set ssl certificates on first user attempt for connect (checking if domain exists in database). Perhaps I test this alternative. I heard this days about Anthos, gona search about it, thanks for the tip. – Lucas Carvalho Jun 16 '20 at 22:32
  • @LucasCarvalho if this answer was helpful please mark as answer/ upvote to help others users – Jan Hernandez Jun 17 '20 at 15:17
  • I already upvoted but as I'm under 15 reputation yet my vote is not publicly displayed – Lucas Carvalho Jun 17 '20 at 19:05
  • not worries, thank you – Jan Hernandez Jun 17 '20 at 19:40