Database, collection and index provisioning

Do you plan on adding the following capabilities to the API?

  • Create/delete a database
  • Create/delete a collection
  • Create/delete/modify indexes

I could do that within my application, like a one time “provisioning” script, but being able to use a consistent devops tool such as Terraform to do the provisioning would really be a big plus.

2 Likes

I think it is all there. You just have to look at the documentation:

For example, you can find, https://docs.mongodb.com/manual/reference/method/db.dropDatabase/ in

And you can find https://docs.mongodb.com/manual/reference/method/db.collection.createIndex/ in

Thank you for your reply but it’s not what I’m looking for. As I stated in my initial message, I don’t want to do it from the CLI, I would like to be able to define my databases, collections and indexes right from terraform, at the same time I’m provisioning the cluster. But for that to be possible, we would need the capabilities to be exposed via the mongodb atlas API (https://docs.atlas.mongodb.com/api/) and create new terraform resources to interact with it.

1 Like

Okay, now I see. Sorry for the diversion.

Solved or bypassed the impasse? If yes, how did you do it?