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

Roles found to have changes. Though they are up to date and no changes were made. #63

Closed
5obol opened this issue Jun 12, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@5obol
Copy link

5obol commented Jun 12, 2020

I am creating few roles as follow:

resource "nexus_role" "ROLE" {
  roleid      = "ROLE"
  name        = "ldap-role bla"
  description = "LDAP role for bla"
  privileges  = ["nx-repository-view-maven2-maven-internal-releases-*", "nx-repository-view-maven2-maven-internal-snapshots-*", "nx-repository-view-maven2-maven-internal-snapshots-browse", "nx-repository-view-maven2-maven-internal-releases-browse"]
  roles       = ["npm-group-read", "internal-atap-read", "internal-atap-write", "docker-group-read", "pypi-group-read"]
}

And during second or any other applies they are tried to be changed:

 # nexus_role.ROLE will be updated in-place
  ~ resource "nexus_role" "ROLE" {
      ~ description = "ROLE" -> "LDAP role for bla"
        id          = "ROLE"
      ~ name        = "ROLE" -> "ldap-role bla"
      ~ privileges  = [
          + "nx-repository-view-maven2-maven-internal-releases-*",
          + "nx-repository-view-maven2-maven-internal-snapshots-*",
          + "nx-repository-view-maven2-maven-internal-snapshots-browse",
          + "nx-repository-view-maven2-maven-internal-releases-browse",
        ]
        roleid      = "ROLE"
      ~ roles       = [
          + "npm-group-read",
          + "internal-read",
          + "internal-write",
          + "docker-group-read",
          + "pypi-group-read",
        ]
    }

But in fact there is some error in logic. As description filed never was equal to "ROLE" . The same as name, privileges etc.

Hence there are seem to be multiple issues:

  • description and name fields for some reason evaluated by the provider as equal to id field value. Even though in reality they have different values.
  • roles and privilages either change its order or somethings else. As they have valid values but are modified all the time.
@fog1985
Copy link

fog1985 commented Jun 15, 2020

Yeap. Facing pretty the same.

@AliAllomani
Copy link

Seems #68 is related.

@fog1985
Copy link

fog1985 commented Jun 24, 2020

Seems #68 is related.

Yeap. Seems so.

@Nosmoht Nosmoht added the bug Something isn't working label Jun 29, 2020
Nosmoht added a commit that referenced this issue Jul 4, 2020
@Nosmoht Nosmoht mentioned this issue Jul 6, 2020
@Nosmoht Nosmoht closed this as completed in cea995d Jul 6, 2020
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
None yet
Development

No branches or pull requests

4 participants