-
Notifications
You must be signed in to change notification settings - Fork 180
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
Error when assigning a custom db role to a database user. #273
Comments
@rifletcher without more data I'm guessing a bit here based on experience but I think there probably needs to be a bit more of a time buffer between the role creation and the user creation. Once the API gets the request to create the role it returns immediate if the request is correct and accepted. The system then applies the new role to the clusters in the project. Once that is done the user can be created with the new role. So depends_on is part of it but likely also need a time delay: something perhaps like (not ideal but a potential workaround): We are working on ways to make these kinds of interactions better in the underlying system as well but no ETA on that currently. |
@rifletcher did the suggested time delay help in the situation? |
@rifletcher hopefully the above helped. Closing issue. |
Hi I know this issue is closed but I am having the same issue. The custom role is created to allow the user to just modify indexes and i added a wait: resource "mongodbatlas_custom_db_role" "createIndex" { actions { resource "time_sleep" "wait_30_seconds" { create_duration = "30s" The user is created: resource "mongodbatlas_database_user" "TestUser" { roles { roles { scopes { depends_on = [time_sleep.wait_30_seconds] However I still get the not supported error: 400 (request "UNSUPPORTED_ROLE") The provided role is not supported It is occurring when the custom role is being linked to the user. |
Hi,
I have an issue where I'm trying to create a custom db role to assign to a db user.
I am using terraform 0.12.26 and mongodbatlas provider 0.6.2.
The error I get on a terraform apply is
The role is created successfully
The user is not created, although I can create a user from the UI with that role manually.
The text was updated successfully, but these errors were encountered: