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

nexus_security_ldap resource group_type does not see the actual value #392

Open
1 task done
dmakeienko opened this issue Oct 11, 2023 · 1 comment
Open
1 task done
Labels
bug Something isn't working

Comments

@dmakeienko
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 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

1.6.1

Nexus Provider Version

1.22

Nexus Version

OSS 3.59.0-01

Affected Resource(s)/Data Source(s)

nexus_security_ldap

Terraform Configuration Files

resource "nexus_security_ldap" "server1" {
  auth_schema                    = "SIMPLE"
  auth_username                  = "[email protected]"
  connection_retry_delay_seconds = 300
  connection_timeout_seconds     = 30
  group_type                     = "dynamic"
  group_subtree                  = false
  host                           = "xx.xx.xx.xx"
  ldap_groups_as_roles           = true
  max_incident_count             = 3
  name                           = "server1"
  port                           = 389
  protocol                       = "LDAP"
  search_base                    = "dc=contoso,DC=com"
  user_base_dn                   = "ou=DomainUsers"
  user_email_address_attribute   = "userPrincipalName"
  user_id_attribute              = "sAMAccountName"
  user_ldap_filter               = ""
  user_object_class              = "user"
  user_real_name_attribute       = "cn"
  user_subtree                   = true
  user_member_of_attribute       = "memberOf"
}

Debug Output/Panic Output

Terraform will perform the following actions:

  # nexus_security_ldap.dc1 will be updated in-place
  ~ resource "nexus_security_ldap" "server1" {
      + group_type                     = "dynamic"
        id                             = "server1"
        name                           = "server1"
        # (19 unchanged attributes hidden)
    }

Expected Behaviour

Terraform should not detect any changes, as this filed already exist but in uppercase
image

As far as I can see, provider passes either "dynamic" or "static" value which is different from what the NEXUS's API returns.
Also this commented line https://github.com/datadrivers/terraform-provider-nexus/blob/main/internal/services/security/resource_security_ldap.go#L253C4-L253C4 tells us that group type is not returned. Since this change is from 3 years ago, I think it should be uncomented

Actual Behaviour

No response

Steps to Reproduce

terraform apply

References

https://github.com/datadrivers/terraform-provider-nexus/blob/main/internal/services/security/resource_security_ldap.go#L88

@dmakeienko dmakeienko added the bug Something isn't working label Oct 11, 2023
@Edu-DevOps
Copy link

I have tried to remove the mentioned code line commented mentioned by @dmakeienko and I confirm that it works as expected.

I will submit a PR to address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: High priority
Development

No branches or pull requests

2 participants