Skip to content

Commit 1872cd5

Browse files
chore(DATAGO-87752): add restriction on gke cluster name length (#81)
1 parent 7087213 commit 1872cd5

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

gke/terraform/modules/bastion/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
variable "cluster_name" {
22
type = string
33
description = "The name of the cluster and name (or name prefix) for all other infrastructure."
4+
5+
validation {
6+
condition = length(var.cluster_name) < 23
7+
error_message = "Cluster name must be less than 23 characters to satisfy google_service_account length restriction."
8+
}
49
}
510

611
variable "common_labels" {

gke/terraform/modules/cluster/variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ variable "region" {
1111
variable "cluster_name" {
1212
type = string
1313
description = "The name of the cluster and name (or name prefix) for all other infrastructure."
14+
15+
validation {
16+
condition = length(var.cluster_name) < 25
17+
error_message = "Cluster name must be less than 25 characters to satisfy google_service_account length restriction."
18+
}
1419
}
1520

1621
variable "common_labels" {

0 commit comments

Comments
 (0)