From 43d3be8418889896bd9ca580808f1407a2527d12 Mon Sep 17 00:00:00 2001 From: francesco-racciatti Date: Fri, 4 Oct 2024 16:59:13 +0200 Subject: [PATCH] feat: add validation to runtime_platform --- variables.tf | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/variables.tf b/variables.tf index 42c7079..c341e53 100644 --- a/variables.tf +++ b/variables.tf @@ -214,9 +214,13 @@ variable "log_retention_days" { variable "runtime_platform" { description = "The runtime platform configuration" type = object({ - cpu_architecture = string - }) - default = ({ - cpu_architecture = "X86_64" - }) + cpu_architecture = string + }) + default = ({ + cpu_architecture = "X86_64" + }) + validation { + condition = contains(["ARM64", "X86_64"], var.runtime_platform.cpu_architecture) + error_message = "The runtime_platform.cpu_architecture must be either 'ARM64' or 'X86_64'" + } }