We are trying to deploy a micro-service based application using google app engine (mainly flexible instances), having a gateway on the default service and a few Microservices providing the business logic. You might think of it as :
foo.appspot.com
service1.foo.appspot.com
service2.foo.appspot.com
as it is done here
I would like the services to be accessible only from the gateway (and maybe few other machines), and not from the outside, but I couldn't get it to work.
I've been able to set all the services on a given VPC network, adding a rule to "Deny All traffic" incoming in this network, except for the gateway that is tagged and allows everything. (as described in this response here)
This works for runtime, however, when doing so we cannot deploy using gcloud app deploy
. (It hangs at the "Updating service" step). I've tried to allow the 22 port, but it seems this is not the one in use. I've also tried to block only the 80 and 443 ports, but now the App Engines service1 and service2 are accessible from this outside again.
How should I configure the firewall to be able to deploy on the App Engine, and restrict access to the services to the gateway only? Is this even possible using the VPC firewall, or should I either use a KCE instance or avoid using GCP infrastructure and sign/verify requests myself?
gcloud app deploy
from the Google Cloud Shell? – Nahuel Varela