@@ -73,15 +73,15 @@ resource "google_bigquery_table" "main" {
7373 labels = each. value [" labels" ]
7474 schema = each. value [" schema" ]
7575 clustering = each. value [" clustering" ]
76- expiration_time = each. value [" expiration_time" ]
76+ expiration_time = each. value [" expiration_time" ] != null ? each . value [ " expiration_time " ] : 0
7777 project = var. project_id
7878 deletion_protection = var. deletion_protection
7979
8080 dynamic "time_partitioning" {
8181 for_each = each. value [" time_partitioning" ] != null ? [each . value [" time_partitioning" ]] : []
8282 content {
8383 type = time_partitioning. value [" type" ]
84- expiration_ms = time_partitioning. value [" expiration_ms" ]
84+ expiration_ms = time_partitioning. value [" expiration_ms" ] != null ? time_partitioning . value [ " expiration_ms " ] : 0
8585 field = time_partitioning. value [" field" ]
8686 require_partition_filter = time_partitioning. value [" require_partition_filter" ]
8787 }
@@ -136,15 +136,15 @@ resource "google_bigquery_table" "materialized_view" {
136136 description = each. value [" description" ]
137137 labels = each. value [" labels" ]
138138 clustering = each. value [" clustering" ]
139- expiration_time = each. value [" expiration_time" ]
139+ expiration_time = each. value [" expiration_time" ] != null ? each . value [ " expiration_time " ] : 0
140140 project = var. project_id
141141 deletion_protection = false
142142
143143 dynamic "time_partitioning" {
144144 for_each = each. value [" time_partitioning" ] != null ? [each . value [" time_partitioning" ]] : []
145145 content {
146146 type = time_partitioning. value [" type" ]
147- expiration_ms = time_partitioning. value [" expiration_ms" ]
147+ expiration_ms = time_partitioning. value [" expiration_ms" ] != null ? time_partitioning . value [ " expiration_ms " ] : 0
148148 field = time_partitioning. value [" field" ]
149149 require_partition_filter = time_partitioning. value [" require_partition_filter" ]
150150 }
@@ -182,7 +182,7 @@ resource "google_bigquery_table" "external_table" {
182182 table_id = each. key
183183 description = each. value [" description" ]
184184 labels = each. value [" labels" ]
185- expiration_time = each. value [" expiration_time" ]
185+ expiration_time = each. value [" expiration_time" ] != null ? each . value [ " expiration_time " ] : 0
186186 project = var. project_id
187187 deletion_protection = var. deletion_protection
188188
0 commit comments