Skip to content
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

Add resource to manage roles of existing users #354

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

interone-ms
Copy link
Contributor

@interone-ms interone-ms commented Apr 13, 2023

This PR resolves #340 in a generic way, by providing a distinct resource to manage roles of an existing user.

This avoids in large installations with users not managed in Terraform the need to import users into Terraform manually so that roles can be managed.

In installations where users are provisioned by LDAP and so cannot be managed by Terraform it enables managing roles in the first place.

Note: Using nexus_security_user_roles and nexus_security_user at the same time will cause drift issues.

(This PR is based on and thus includes the logging changes in #353)

resource "nexus_security_user_roles" "myuser" {
	userid    = "myuser"
	roles     = ["nx-anonymous", "myrole"]
}

Copy link
Member

@anmoel anmoel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@anmoel
Copy link
Member

anmoel commented May 10, 2023

hi @interone-ms,

thanks for the PR. It's looks good but the new acceptance test is failing. please fix it.

thank in advance and kind regard
André

@anmoel anmoel self-requested a review May 10, 2023 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for updating anonymous user role
3 participants