terraform-provider-mongodb
terraform-provider-mongodb copied to clipboard
Sort privileges before inserting and comparing
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"
}
}