Skip to content

Commit

Permalink
more vars
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Feb 19, 2025
1 parent f41952d commit 072c516
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tests/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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'."
}
}

Expand Down

0 comments on commit 072c516

Please sign in to comment.