I am trying to create MongoDB connection from google cloud functions.
this is what I am doing to establish connection await MongoClient.connect(uri). I have already set up VPC peering and the status is available. I also added 10.128.0.0 to the whitelist. However, when I call the cloud function, I am getting
MongoServerSelectionError: Client network socket disconnected before secure TLS connection was established at Timeout...
I also added vpc to cloud function that I am calling with Allow all traffic for ingress and Route only requests to private IPs through the VPC connector to egress
What can I do to fix this issue?