Skip to content

Instantly share code, notes, and snippets.

View peterver's full-sized avatar
🎯
Focusing

Peter Vermeulen peterver

🎯
Focusing
View GitHub Profile
@peterver
peterver / mongo-atlas-whitelist-entrypoint.md
Created July 8, 2022 08:42 — forked from the-vampiire/mongo-atlas-whitelist-entrypoint.md
docker entrypoint to automatically whitelist mongo atlas IP

why

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"