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 source parameter to user resource #475

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

Conversation

Edu-DevOps
Copy link

Issue detailed here: #371 (comment)

In a nutshell, without the source parameter two users (one local and one LDAP) can collide using the same userid.

I've updated documentation and run tests successfully.

This is a test done in a local environment:

Terraform will perform the following actions:

  # nexus_security_user.test will be created
  + resource "nexus_security_user" "test" {
      + email     = "[email protected]"
      + firstname = "Test"
      + id        = (known after apply)
      + lastname  = "User"
      + password  = (sensitive value)
      + roles     = [
          + "nx-admin",
        ]
      **+ source    = "default"**
      + status    = "active"
      + userid    = "test-user"
    }

Plan: 1 to add, 0 to change, 0 to destroy.
2024-10-18T14:39:44.953+0200 [DEBUG] command: asking for input: "\nDo you want to perform these actions?"

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

And this is a state show of the object

terraform state show nexus_security_user.test
# nexus_security_user.test:
resource "nexus_security_user" "test" {
    email     = "[email protected]"
    firstname = "Test"
    id        = "test-user"
    lastname  = "User"
    password  = (sensitive value)
    roles     = [
        "nx-admin",
    ]
    source    = "default"
    status    = "active"
    userid    = "test-user"
}

Taken advantage of the PR I've fixed the examples/local-development/main.tf file which was using a resource that doesn't exist

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.

1 participant