Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
alldoami committed Oct 1, 2024
1 parent f8b5f77 commit d9e954e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions databricks-s3-volume-existing-catalog/grants.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ locals {

# Read-only access grants
resource "databricks_grant" "volume_r" {
for_each = length(local.volume_r_grants) > 0 ? { for grant in local.volume_r_grants : grant.volume_name => grant } : {}
for_each = { for grant in local.volume_r_grants : grant.volume_name => grant if length(local.volume_r_grants) > 0 }

volume = databricks_volume.volume[each.value.volume_name].id
principal = each.value.principal
Expand All @@ -31,7 +31,7 @@ resource "databricks_grant" "volume_r" {

# Read/write access grants
resource "databricks_grant" "volume_rw" {
for_each = length(local.volume_r_grants) > 0 ? { for grant in local.volume_rw_grants : grant.volume_name => grant } : {}
for_each = { for grant in local.volume_rw_grants : grant.volume_name => grant if length(local.volume_rw_grants) > 0 }

volume = databricks_volume.volume[each.value.volume_name].id
principal = each.value.principal
Expand Down

0 comments on commit d9e954e

Please sign in to comment.