Hello ,
Is there a way to automate db and dbUser creation on Atlas? Even with Atlas admin i can’t create db and user via following as it is giving a permission error. My aim is to create a Jenkins Job that will be a part of automation of entire infrastructure:
use test
db.createUser(
{
user: "test",
pwd: "Password123",
roles: [
{
role: "readWrite",
db: "test"
}]
})
2020-04-15T21:56:12.268+0100 E QUERY [js] uncaught exception: Error: couldn't add user: not authorized on test to execute command
So what do you suggest to automate this db and dbUser creation via Jenkins ?