I'm trying to connect to a local MongoDB using only a URI string over TLS. I can connect just fine using flags, but for my project's purposes I'd like to have a URI string too.
For example, the following works:
mongo mongodb://127.0.0.1:27017/dbName --tls --tlsCAFile=/path/to/ca.pem --tlsCertificateKeyFile=/path/to/key.pem
But I'd like for something like this to work:
mongo 'mongodb://127.0.0.1:27017/dbName?tls=true&tlsCAFile=/path/to/ca.pem&tlsCertificateKeyFile=/path/to/key.pem'
How do I write this URI string to get it to work for my intended purposes?
Any help is appreciated, thanks.