mongo atlas provides a reasonably priced access to a managed mongo DB. CSPs where containers are hosted charge too much for their managed mongo DB. they all suggest setting an insecure CIDR (0.0.0.0/0
) to allow the container to access the cluster. this is obviously ridiculous.
this entrypoint script is surgical to maintain least privileged access. only the current hosted IP address of the service is whitelisted.
related searches, hope this shows up for you
- "How to connect to mongodb atlas cluster to container app service EKS ECS cloudrun compute engine"
- "mongodb atlas cluster access without using whitelist 0.0.0.0"