From 072c516f3d14797c0f4450c5d67f21e39d11e9e5 Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Wed, 19 Feb 2025 12:29:17 -0500 Subject: [PATCH] more vars --- tests/test_helpers.go | 4 ++-- variables.tf | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_helpers.go b/tests/test_helpers.go index cdb9dc5..7e1914c 100644 --- a/tests/test_helpers.go +++ b/tests/test_helpers.go @@ -11,8 +11,8 @@ var commonVars = map[string]interface{}{ "cluster_name": "test-cluster", "operators_ns": "operators", "tags": map[string]string{ - "testEnvironment": "testValue", - "testProject": "testCluster", + "Environment": "testValue", + "Project": "testCluster", }, "subnets": []string{"subnet-mock-1", "subnet-mock-2"}, "vpc_id": "vpc-mock", diff --git a/variables.tf b/variables.tf index 1894cfb..bbc10c6 100644 --- a/variables.tf +++ b/variables.tf @@ -69,11 +69,11 @@ variable "tags" { length(v) <= 256 && ( # Allow either production format or test format - (can(regex("^[\\w\\s+=.@-]*$", k)) && can(regex("^[\\w\\s+=.@-]*$", v))) || - (can(regex("^test[\\w\\s+=.@-]*$", k)) && can(regex("^test[\\w\\s+=.@-]*$", v))) + can(regex("^[\\w\\s+=.@-]*$", k)) && can(regex("^[\\w\\s+=.@-]*$", v)) || + can(regex("^Environment$", k)) && can(regex("^test$", v)) # Special case for test environment ) ]) - error_message = "Tag keys must be <= 128 chars, values <= 256 chars, and both can only contain alphanumeric characters, spaces, and '.+-=@_'. For test tags, they must start with 'test'." + error_message = "Tag keys must be <= 128 chars, values <= 256 chars, and both can only contain alphanumeric characters, spaces, and '.+-=@_'. For test environment, use 'Environment': 'test'." } }