Hello,
I am running a Node.js backend with mongoose in Google Cloud, Cloud Run, and a mongoDB cluster in Atlas. I have now configured VPC peering with VPC serveless connector, as explained in the set up guide provided by Google: https://github.com/GoogleCloudPlatform/community/blob/master/archived/serverless-vpc-access-private-mongodb-atlas/index.md
All statuses are green for the VPC connection on both sides, and my backend successfully connects to the cluster through the VPC, using the private connection string.
But turns out not all is well; something very strange is happening: Certain (not all) find() queries return 0 matches even though there actually are matches. There are no errors, I just get 0 results.
If I run the same queries outside of the VPC, everything works fine.
Has anyone else experienced this and found a solution?
Thank you!