Skip to content

Commit 1ee09d2

Browse files
authored
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
1 parent cdd0eb7 commit 1ee09d2

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

examples/eks-cluster-with-vpc/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ variable "cluster_name" {
22
description = "Name of cluster - used by Terratest for e2e test automation"
33
type = string
44
default = ""
5+
6+
validation {
7+
# cluster name is used as prefix on eks_blueprint module and cannot be >25 characters
8+
condition = can(regex("^[a-zA-Z][-a-zA-Z0-9]{3,24}$", var.cluster_name))
9+
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}'."
10+
}
511
}
612
variable "aws_region" {
713
description = "AWS Region"

modules/eks-monitoring/dashboards/cluster.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2999,4 +2999,4 @@
29992999
"uid": "efa86fd1d0c121a26444b636a3f509a8",
30003000
"version": 23,
30013001
"weekStart": ""
3002-
}
3002+
}

modules/eks-monitoring/dashboards/namespace-workloads.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2657,4 +2657,4 @@
26572657
"uid": "a87fb0d919ec0ea5f6543124e16c42a5",
26582658
"version": 2,
26592659
"weekStart": ""
2660-
}
2660+
}

modules/eks-monitoring/dashboards/workloads.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2265,4 +2265,4 @@
22652265
"uid": "a164a7f0339f99e89cea5cb47e9be617",
22662266
"version": 7,
22672267
"weekStart": ""
2268-
}
2268+
}

0 commit comments

Comments
 (0)