diff --git a/modules/vpc/variables.tf b/modules/vpc/variables.tf index 243ff44..72381ee 100644 --- a/modules/vpc/variables.tf +++ b/modules/vpc/variables.tf @@ -66,11 +66,11 @@ variable "subnetworks" { })) validation { condition = alltrue([ - for subnet in var.subnetworks : - subnet.log_config != null ? ( - (subnet.log_config.aggregation_interval != null && can(regex("^INTERVAL_(5_SEC|30_SEC|1_MIN|5_MIN|10_MIN|15_MIN)$", subnet.log_config.aggregation_interval)) ? true : false) && - (subnet.log_config.metadata != null && can(regex("^(EXCLUDE_ALL_METADATA|INCLUDE_ALL_METADATA|CUSTOM_METADATA)$", subnet.log_config.metadata)) ? true : false) - ) : true + for subnet in var.subnetworks : + subnet.log_config != null ? ( + (subnet.log_config.aggregation_interval != null && can(regex("^INTERVAL_(5_SEC|30_SEC|1_MIN|5_MIN|10_MIN|15_MIN)$", subnet.log_config.aggregation_interval)) ? true : false) && + (subnet.log_config.metadata != null && can(regex("^(EXCLUDE_ALL_METADATA|INCLUDE_ALL_METADATA|CUSTOM_METADATA)$", subnet.log_config.metadata)) ? true : false) + ) : true ]) error_message = "If log_config is specified, aggregation_interval must be one of INTERVAL_5_SEC, INTERVAL_30_SEC, INTERVAL_1_MIN, INTERVAL_5_MIN, INTERVAL_10_MIN, INTERVAL_15_MIN, and metadata must be one of EXCLUDE_ALL_METADATA, INCLUDE_ALL_METADATA, or CUSTOM_METADATA." }