How to connect to MongoDB Atlas from Google Compute Engine?

1k Views Asked by At

I have several MongoDB clusters in Atlas with Network Peering set up and successfully connected all Cloud Run services through VPC accessors. When creating a Compute Engine instance through the web UI, it does not let me choose a VPC so I am wondering how can I connect the VM to Atlas with network peering?

1

There are 1 best solutions below

0
On

To perform VPC peering you requires the next steps:

-Have a paid subscription to Mongo Atlas

-Create a peering between Mongo Atlas and your project

-Create a serverless VPC connector and add it to your App Engine to allow it to reach the private IP on the VPC and peering attached to the VPC, like your Mongo Atlas DB.