Skip to content

Commit

Permalink
for_each
Browse files Browse the repository at this point in the history
  • Loading branch information
alldoami committed Sep 27, 2024
1 parent 8152822 commit 30574e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions databricks-s3-volume-existing-catalog/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ resource "time_sleep" "wait_30_seconds" {
}

resource "databricks_external_location" "volume" {
for_each = var.volume_buckets
for_each = { for bucket in var.volume_buckets : bucket.bucket_name => bucket }
depends_on = [time_sleep.wait_30_seconds]

name = "${each.value.bucket_name}-external-location"
Expand All @@ -42,7 +42,7 @@ resource "databricks_external_location" "volume" {

# New volume
resource "databricks_volume" "volume" {
for_each = var.volume_buckets
for_each = { for bucket in var.volume_buckets : bucket.bucket_name => bucket }
depends_on = [databricks_external_location.volume]
name = each.value.bucket_name
catalog_name = var.catalog_name
Expand Down

0 comments on commit 30574e9

Please sign in to comment.