I'm trying to connect Google App Engine with my existing MongoDB Atlas instance. The issue is that I cannot whitelist an IP directly as I would do it with a custom server. So I followed this tutorial for adding a VPC Network connection:
https://cloud.google.com/community/tutorials/serverless-vpc-access-private-mongodb-atlas
So I followed the tutorial and double checked my setup. Here is my VPC Setup:
- I use the default network
- My Network Peering. I added the blurred information to Atlas like in the tutorial.
- My Connector. I added the IP u can see here to the IP Whitelist in Atlas
- At the end I added this to my app.yaml file:
vpc_access_connector: name: projects/<PROJECT_ID>/locations/europe-west3/connectors/mongo-connector
The connector and my appengine are both in europe-west3 region.
After redeploying I still getting this error:
My connection string looks like this: mongodb+srv://[USERNAME]:[PASSWORD]@[CLUSTER_NAME]-pri.[SUBDOMAIN].mongodb.net/
I'm using a M10 cluster which is required for peering.
So has anyone an idea what I'm doing wrong here?