I am looking for a viable approach to create a set of default users with different level of privileges into a DocumentDB instance (let's say read-only user, read/write user etc..).
I do provision using Terraform, I first tried by looking at specific Terraform resources, but there is no one since the DocumentDB API actually does not have a user resource (see Boto3 client: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/docdb.html)
Then I came to the option to run some mongosh commands by the Terraform null_resource and local-exec provisioner... but I don't like that way since it introduces quite a number of requirements in the machine where the mongosh commands runs, as well as extra requirements on the firewall configuration of the DocumentDB.
I would love to solve this issue by providing to the DocumentDB instance with a configuration to import (json or so...) where my users are listed... not sure if that's feasible.