Please vote on this issue by adding a :thumbsup: reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform Version
v1.5.1
Nexus Provider Version
1.21.2
Nexus Version
3.41.0-01
Affected Resource(s)/Data Source(s)
nexus_security_role
Terraform Configuration Files
I want to update a role which is used by other roles.
This specific role allow to read to all public repository and for that I add to it "read privilege" of all projet.
When I add a projet, I have to update that role.
and terraform returns an error
Why the role is not updated ?
thx
Michel
Debug Output/Panic Output
nexus_security_role.indus-all-acces-pub-read: Creating...
╷
│ Error: "Role 'indus-all-acces-pub-read' already exists, use a unique roleId."
│
│ with nexus_security_role.indus-all-acces-pub-read,
│ on main.tf line 30, in resource "nexus_security_role" "indus-all-acces-pub-read":
│ 30: resource "nexus_security_role" "indus-all-acces-pub-read" {
Expected Behaviour
role updated
Actual Behaviour
error
Steps to Reproduce
locals {
privileges_all_read = [for x in data.nexus_privileges.priv_pub_read.privileges:
x.name if can(regex("public-browse|public-read", x.name))
]
}
Is there an existing issue for this?
Community Note
Terraform Version
v1.5.1
Nexus Provider Version
1.21.2
Nexus Version
3.41.0-01
Affected Resource(s)/Data Source(s)
nexus_security_role
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
role updated
Actual Behaviour
error
Steps to Reproduce
locals { privileges_all_read = [for x in data.nexus_privileges.priv_pub_read.privileges: x.name if can(regex("public-browse|public-read", x.name)) ] }
resource "nexus_security_role" "indus-all-acces-pub-read" { description = "indus-all-acces-pub-read" name = "indus-all-acces-pub-read" roleid = "indus-all-acces-pub-read" privileges = local.privileges_all_read }
References
No response