In This article i will show you how to provision database users and roles using terraform with mongodb provider from terraform.
Did you come across a need to provision a database user or a database role with Terraform and you couldn’t find a solution ?
I did and i found myself using a Mongo client with a null_resource from Terraform and the was sad:(
Hopefully there’s another solution.
So i create a Terraform provider that can help us :D
Thanks to Kaginari’s mongodb provider now we can provision database users and role using Terraform
1- Configuring the provider :