You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
locals {
testers = {
"A"="a@example.com""B"="b@example.com""C"="c@example.com"
}
}
resource"grafana_user""testers" {
for_each =local.testers
name = each.key
email = each.value
login = each.value
password ="PASSWORD"
is_admin =false
}
resource"grafana_team""testers" {
name ="Testing team"# Re-ordering the members here would cause a terraform change that is not persisted.# i.e. The initial order will be kept even if we `terraform apply` a different order.
members = [
local.testers["A"],
local.testers["B"],
local.testers["C"],
]
depends_on = [grafana_user.testers]
}
It's managed as a set by the Grafana API (and client) but we have it as a list in the resource
This means that whenever the ordering change, it's not being pushed to the API and we have a drift (see issue for more info)
This makes the members attribute a set. Migration is not an issue since both lists and sets are represented as JSON lists in the state (I tested it)
Closes#384
* Fix `grafana_team` members reordering
It's managed as a set by the Grafana API (and client) but we have it as a list in the resource
This means that whenever the ordering change, it's not being pushed to the API and we have a drift (see issue for more info)
This makes the members attribute a set. Migration is not an issue since both lists and sets are represented as JSON lists in the state (I tested it)
Closes#384
* Regenerate docs
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
If we reorder
members
, e.g.terraform apply
should apply and save the new ordering. Subsequentterraform apply
should show no changes.Actual Behavior
There is always a change as follows,
The text was updated successfully, but these errors were encountered: