Fix folder variables

This commit is contained in:
Julio Castillo 2022-11-12 12:07:48 +01:00
parent 8fe19ad7c2
commit daf0fef7cd
1 changed files with 2 additions and 2 deletions

View File

@ -106,7 +106,7 @@ variable "logging_sinks" {
description = "Logging sinks to create for this folder." description = "Logging sinks to create for this folder."
type = map(object({ type = map(object({
bq_partitioned_table = optional(bool) bq_partitioned_table = optional(bool)
description = optional(string) description = optional(string)
destination = object({ destination = object({
type = string type = string
target = string target = string
@ -128,7 +128,7 @@ variable "logging_sinks" {
validation { validation {
condition = alltrue([ condition = alltrue([
for k, v in var.logging_sinks : for k, v in var.logging_sinks :
v. != true || v.destination.type == "bigquery" v.bq_partitioned_table != true || v.destination.type == "bigquery"
]) ])
error_message = "Can only set when destination type is `bigquery`." error_message = "Can only set when destination type is `bigquery`."
} }