diff --git a/modules/folder/logging.tf b/modules/folder/logging.tf index 6351194a81..2b5a73fffa 100644 --- a/modules/folder/logging.tf +++ b/modules/folder/logging.tf @@ -38,7 +38,7 @@ resource "google_logging_folder_sink" "sink" { disabled = each.value.disabled dynamic "bigquery_options" { - for_each = each.value.bq_partitioned_table != null ? [""] : [] + for_each = each.value.type == "biquery" && each.value.bq_partitioned_table != false ? [""] : [] content { use_partitioned_tables = each.value.bq_partitioned_table } diff --git a/modules/organization/logging.tf b/modules/organization/logging.tf index a4f90ef5de..e78a2c4d4e 100644 --- a/modules/organization/logging.tf +++ b/modules/organization/logging.tf @@ -37,7 +37,7 @@ resource "google_logging_organization_sink" "sink" { disabled = each.value.disabled dynamic "bigquery_options" { - for_each = each.value.bq_partitioned_table != null ? [""] : [] + for_each = each.value.type == "biquery" && each.value.bq_partitioned_table != null ? [""] : [] content { use_partitioned_tables = each.value.bq_partitioned_table } diff --git a/modules/project/logging.tf b/modules/project/logging.tf index bc1b1e8b0b..1db60dca4e 100644 --- a/modules/project/logging.tf +++ b/modules/project/logging.tf @@ -37,7 +37,7 @@ resource "google_logging_project_sink" "sink" { disabled = each.value.disabled dynamic "bigquery_options" { - for_each = each.value.bq_partitioned_table != null ? [""] : [] + for_each = each.value.type == "biquery" && each.value.bq_partitioned_table != null ? [""] : [] content { use_partitioned_tables = each.value.bq_partitioned_table }