I am trying to do some CRUD MongoDB operations from bitbucket pipelines. I have a Dedicated MongoDB cluster hosted in MongoDB Atlas AWS Setup. The problem is I am not able to connect to the cluster from the Bitbucket pipelines build environment.
Currently, MongoDB Atlas provides 3 ways to allow network access
- Whitelist IPs
- Peering
- Private Endpoint
I see Bitbucket provides a list of IPs to whitelist.But maybe these IPs can change at any point and also it's a very long list to manage in Atlas.
Is there a better solution to allow bitbucket pipelines build environment to access Atlas clusters?