Skip to content

Commit

Permalink
update validation
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Feb 19, 2025
1 parent 8260a9e commit 255c177
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 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("^[\\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 environment, use 'environment': '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 255c177

Please sign in to comment.