Hi All,
I’m trying to use the databricks_grants resource block to create multiple grants for different schemas with different principals.
My code:
resource “databricks_grants” “schema_grants” {
for_each = { for ls in var.schema_grants_csv : ls.sno => ls }
schema = “{each.value.catalog}.{each.value.schema}”
dynamic “grant” {
for_each = each.value
content {
principal = each.value.principal
privileges = tolist(split(“:”,each.value.grants))
}
}
}
The code will deploy correctly on the initial run, but if it’s run again it will delete all of the previous deployments while keeping them in the state file so terraform seems to think they still exist. We have a CSV file with all the necessary details for this code block to pull from and it’s deploying correctly with a single run but does anyone have an idea why we can’t make updates or run again without changing any details in the CSV?