-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix mongodb role that constantly update at each Update #536
Conversation
… db for consistency
…ix-mongodb-role-admin
Optional: true, | ||
Elem: &schema.Schema{ | ||
Type: schema.TypeString, | ||
ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of this error, couldn't you manually add the @admin
part to the role when it is not present ? This way we would avoid the breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for this one we won't be able to dodge the breaking change.
We should not imply the @admin for the customer as it determine on which database the user have rights. For this reason we would prefer customer to be fully aware of the value it will be set to.
seen together, the doc should be updated to inform users that there is a breaking change in the new version |
@lpatte tests |
Description
Fix an Issue Reported to me where some MongoDB role constantly update (ie: clusterMonitor@admin).
The reason was because we trimed "@admin" in the output because on API side we have some "builtin" role that the user can use without add the "@admin" (it is syntactic sugar).
But of course that break all other role with admin as authentication database that not a builtin role.
So to be more consistent, I remove this trim and force user to alway add the authentication database.
Like this it's easier to check update and clearer for the user.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
I locally build Terraform and test with following roles resources to apply several time: