Lsa/resource name length i#118 (#135)

* Validation added to cluster_name variable

* Update ref to eks-cluster-with-vpc on v4.13.1 (#121)

* Added cluster_name validation with message (#118)

* Error message typo fixed to follow the standards.

* Adding requested new line at the end
This commit is contained in:
Luis Amaral
2023-03-28 01:48:09 -06:00
committed by GitHub
parent cdd0eb7beb
commit 1ee09d2c1a
4 changed files with 9 additions and 3 deletions
@@ -2,6 +2,12 @@ variable "cluster_name" {
description = "Name of cluster - used by Terratest for e2e test automation"
type = string
default = ""
validation {
# cluster name is used as prefix on eks_blueprint module and cannot be >25 characters
condition = can(regex("^[a-zA-Z][-a-zA-Z0-9]{3,24}$", var.cluster_name))
error_message = "Cluster name is used as a prefix-name for other resources. Max size is 25 chars and must satisfy regular expression pattern: '[a-zA-Z][-a-zA-Z0-9]{3,19}'."
}
}
variable "aws_region" {
description = "AWS Region"