From 71165e49cd0ec592f202e1f69ae92a8c6c77803b Mon Sep 17 00:00:00 2001 From: David Costa Date: Mon, 22 Jul 2024 14:41:27 +0100 Subject: [PATCH] Add validation to autoscaling variable --- variables.tf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/variables.tf b/variables.tf index f9076f9..0c61cf6 100644 --- a/variables.tf +++ b/variables.tf @@ -120,6 +120,10 @@ variable "autoscaling" { })) }) default = null + validation { + condition = var.schedules != null ? length(var.schedules) > 0 : true + error_message = "If this variable is defined, at least one schedule must be provided" + } } variable "domain" {