From a38ec2d53e910ac869c5c9f9150b565d41b9a0f7 Mon Sep 17 00:00:00 2001 From: celloza Date: Wed, 6 Aug 2025 12:24:00 +0100 Subject: [PATCH] fix: Fix `use_extended_validation` condition --- infrastructure/variables.tf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/infrastructure/variables.tf b/infrastructure/variables.tf index 93a306f..e2aba30 100644 --- a/infrastructure/variables.tf +++ b/infrastructure/variables.tf @@ -78,8 +78,8 @@ variable "blob_storage_backups" { } validation { - condition = var.use_extended_retention == true || alltrue([for k, v in var.blob_storage_backups : contains(local.valid_retention_periods, v.retention_period)]) - error_message = "Invalid retention period: valid periods are up to 7 days. If you require a longer retention period then please set use_exetended_retention to true." + condition = var.use_extended_retention ? true : alltrue([for k, v in var.blob_storage_backups : contains(local.valid_retention_periods, v.retention_period)]) + error_message = "Invalid retention period: valid periods are up to 7 days. If you require a longer retention period then please set use_extended_retention to true." } } @@ -104,8 +104,8 @@ variable "managed_disk_backups" { } validation { - condition = var.use_extended_retention == true || alltrue([for k, v in var.managed_disk_backups : contains(local.valid_retention_periods, v.retention_period)]) - error_message = "Invalid retention period: valid periods are up to 7 days. If you require a longer retention period then please set use_exetended_retention to true." + condition = var.use_extended_retention ? true : alltrue([for k, v in var.managed_disk_backups : contains(local.valid_retention_periods, v.retention_period)]) + error_message = "Invalid retention period: valid periods are up to 7 days. If you require a longer retention period then please set use_extended_retention to true." } } @@ -127,7 +127,7 @@ variable "postgresql_flexible_server_backups" { } validation { - condition = var.use_extended_retention == true || alltrue([for k, v in var.postgresql_flexible_server_backups : contains(local.valid_retention_periods, v.retention_period)]) - error_message = "Invalid retention period: valid periods are up to 7 days. If you require a longer retention period then please set use_exetended_retention to true." + condition = var.use_extended_retention ? true : alltrue([for k, v in var.postgresql_flexible_server_backups : contains(local.valid_retention_periods, v.retention_period)]) + error_message = "Invalid retention period: valid periods are up to 7 days. If you require a longer retention period then please set use_extended_retention to true." } }