Skip to content

Commit 225803f

Browse files
authored
fix: added condition for policy creation
1 parent 2433704 commit 225803f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ resource "azurerm_role_assignment" "this" {
4242
}
4343

4444
resource "databricks_cluster_policy" "this" {
45-
for_each = {
45+
for_each = var.sku == "premium" ? {
4646
for param in var.custom_cluster_policies : (param.name) => param.definition
4747
if param.definition != null
48-
}
48+
} : {}
4949

5050
name = each.key
5151
definition = jsonencode(each.value)

0 commit comments

Comments
 (0)