Kaginari / terraform-provider-mongodb

Terraform provider for mongodb instance (selfhosted, AWS documentDB and cloud instances )
MIT License
24 stars 31 forks source link

fix: Use dropRole to delete role #23

Closed krtk6160 closed 2 years ago

krtk6160 commented 2 years ago

Fixes #22

I found out that in order to delete a document from the system.roles collection, the user needs to be given explicit permission for the collection. The admin user might not have those privileges on custom databases.

However, we can instead use dropRole on the database embedded in the stateId to delete the role.

ITMonta commented 2 years ago

@krtk6160 thank for the contribution version 1.4.0 published