Skip to content

Add resource to manage roles of existing users#354

Open
interone-ms wants to merge 5 commits intodatadrivers:mainfrom
interone-ms:feature/manage_roles
Open

Add resource to manage roles of existing users#354
interone-ms wants to merge 5 commits intodatadrivers:mainfrom
interone-ms:feature/manage_roles

Conversation

@interone-ms
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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