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

Sort privileges before inserting and comparing #38

Open
julianogv opened this issue Jul 19, 2023 · 0 comments
Open

Sort privileges before inserting and comparing #38

julianogv opened this issue Jul 19, 2023 · 0 comments
Assignees

Comments

@julianogv
Copy link

Hi there.
First, thanks for the good work with this provider, It has been very useful.

I've noticed that every time I run a terraform plan, it shows a difference between existing and new privileges, due to the order of actions' list.

As you can see below, the actions' lists are the same, only the order is different.
Maybe sorting before inserting and comparing would solve the problem.

  ~ resource "mongodb_db_role" "role" {
        id       = "REDACTED"
        name     = "REDACTED"
        # (1 unchanged attribute hidden)

      - privilege {
          - actions    = [
              - "find",
              - "insert",
              - "remove",
              - "update",
            ] -> null
          - collection = "REDACTED" -> null
          - db         = "REDACTED" -> null
        }
      + privilege {
          + actions    = [
              + "find",
              + "insert",
              + "update",
              + "remove",
            ]
          + collection = "REDACTED"
          + db         = "REDACTED"
        }
    }
@ITMonta ITMonta self-assigned this Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants