diff --git a/examples/eks-cluster-with-vpc/variables.tf b/examples/eks-cluster-with-vpc/variables.tf index 23329cb..bb93d3c 100644 --- a/examples/eks-cluster-with-vpc/variables.tf +++ b/examples/eks-cluster-with-vpc/variables.tf @@ -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" diff --git a/modules/eks-monitoring/dashboards/cluster.json b/modules/eks-monitoring/dashboards/cluster.json index ae16330..af88e93 100644 --- a/modules/eks-monitoring/dashboards/cluster.json +++ b/modules/eks-monitoring/dashboards/cluster.json @@ -2999,4 +2999,4 @@ "uid": "efa86fd1d0c121a26444b636a3f509a8", "version": 23, "weekStart": "" -} \ No newline at end of file +} diff --git a/modules/eks-monitoring/dashboards/namespace-workloads.json b/modules/eks-monitoring/dashboards/namespace-workloads.json index b69d7a5..a1a1732 100644 --- a/modules/eks-monitoring/dashboards/namespace-workloads.json +++ b/modules/eks-monitoring/dashboards/namespace-workloads.json @@ -2657,4 +2657,4 @@ "uid": "a87fb0d919ec0ea5f6543124e16c42a5", "version": 2, "weekStart": "" -} \ No newline at end of file +} diff --git a/modules/eks-monitoring/dashboards/workloads.json b/modules/eks-monitoring/dashboards/workloads.json index 040e260..f50402c 100644 --- a/modules/eks-monitoring/dashboards/workloads.json +++ b/modules/eks-monitoring/dashboards/workloads.json @@ -2265,4 +2265,4 @@ "uid": "a164a7f0339f99e89cea5cb47e9be617", "version": 7, "weekStart": "" -} \ No newline at end of file +}