How to setup MongoDB with Terra API for data storage

EvilWolverine7 months ago

Hello. We are interested in using MongoDB (hosted on Atlas) for storing Terra payloads. We feel that it is ideal for the unstructured data in your models and the type of queries we will perform from our backend. We have tried submitting the query string in the format requested on the dashboard, yet we recieve the following error message: "Could not establish a connection, ensure terra ip addresses are whitelisted"

Which IP addresses would these be and where would we find them.

terra

Danieladmin7 months ago

Hey there,

You can whitelist Terra by going to your project dashboard on Atlas and navigating to Security > Network Access > Add IP Address and submitting the following

IP Addresses:

  • 18.133.218.210/32
  • 18.169.82.189/32
  • 18.132.162.19/32

These changes may take a few minutes to update, but then you should be able to submit the MongoDB connection details with no error!


EvilWolverine7 months ago

We have tried that but we still recieve the same error message. Here are the connection details (I have obscured parts of the string): URL => mongodb://devcluster.XXXXXXX.mongodb.net, Cluster Name => TestCluster


terra

Danieladmin7 months ago

I see, the issue could be that the scheme in the provided host url is mongodb:// and not mongodb+srv:// which would mean Terra is unable to resolve the host location as the cluster would be sharded over multiple replica instances. Could you change it and try again?


EvilWolverine7 months ago

Yes, that fixed it, thank you


terra

Danieladmin7 months ago

Awesome!


Cookie Preferences

Essential CookiesAlways On
Advertisement Cookies
Analytics Cookies

Crunch Time: Embrace the Cookie Monster Within!

We use cookies to enhance your browsing experience and analyse our traffic. By clicking “Accept All”, you consent to our use of cookies according to our Cookie Policy. You can change your mind any time by visiting out cookie policy.