Only set partitioned table when sink type is bigquery

Fixes 990
This commit is contained in:
Julio Castillo 2022-11-22 15:48:20 +01:00
parent 948b61fdce
commit e629a997d1
3 changed files with 3 additions and 3 deletions

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}