Skip to content

Commit fd29116

Browse files
authored
Merge pull request #7 from data-platform-hq/fix/fixed_grants_condition
fix: fixed condition
2 parents a05448d + a6950be commit fd29116

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ resource "databricks_catalog" "this" {
7777

7878
# Catalog grants
7979
resource "databricks_grants" "catalog" {
80-
for_each = alltrue([var.create_metastore, length(var.external_metastore_id) != 0]) ? {
80+
for_each = anytrue([var.create_metastore, length(var.external_metastore_id) != 0]) ? {
8181
for name, params in var.catalog : name => params.catalog_grants
8282
if params.catalog_grants != null
8383
} : {}
@@ -107,7 +107,7 @@ locals {
107107
}
108108

109109
resource "databricks_schema" "this" {
110-
for_each = alltrue([var.create_metastore, length(var.external_metastore_id) != 0]) ? {
110+
for_each = anytrue([var.create_metastore, length(var.external_metastore_id) != 0]) ? {
111111
for entry in local.schema : "${entry.catalog}.${entry.schema}" => entry
112112
} : {}
113113

@@ -131,7 +131,7 @@ locals {
131131
}
132132

133133
resource "databricks_grants" "schema" {
134-
for_each = alltrue([var.create_metastore, length(var.external_metastore_id) != 0]) ? {
134+
for_each = anytrue([var.create_metastore, length(var.external_metastore_id) != 0]) ? {
135135
for entry in local.schema_grants : "${entry.catalog}.${entry.schema}.${entry.principal}" => entry
136136
} : {}
137137

0 commit comments

Comments
 (0)