From 9fa29569c7b4d25e4f48f5260a7e3c168b28e676 Mon Sep 17 00:00:00 2001 From: piyush Date: Wed, 3 Sep 2025 11:54:56 +0530 Subject: [PATCH] chore: Fix regex validation to enforce exact match (public or private) --- variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variables.tf b/variables.tf index 66a8e5e..d2ba29b 100644 --- a/variables.tf +++ b/variables.tf @@ -7,7 +7,7 @@ variable "endpoint_type" { description = "The type of endpoint to be used for creating keys. Accepts 'public' or 'private'" default = "public" validation { - condition = can(regex("public|private", var.endpoint_type)) + condition = can(regex("^(public|private)$", var.endpoint_type)) error_message = "The endpoint_type value must be 'public' or 'private'." } }