Just installed mongodb using click-to-deploy in google cloud platform. I have another project, for which I created the mongodb database, where my web application runs. Do I
This answer explains how to set the firewall rule for port 27017.
Another issue that could cause this is running your mongodb in a separate network and having your other instances on the default network (or vice versa).
I ran into this and after getting both instances on the same network, it was able to connect to the mongo instance by name.
Here's an example of how to set the network for a managed VM in your app.yaml:
network:
instance_tag: https-server
name: my-node-network