File tree Expand file tree Collapse file tree 6 files changed +14
-2
lines changed Expand file tree Collapse file tree 6 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ data "google_compute_subnetwork" "subnetwork" {
33
33
module "gke" {
34
34
source = " ../../"
35
35
project_id = " ${ var . project_id } "
36
- name = " ${ local . cluster_type } -cluster"
36
+ name = " ${ local . cluster_type } -cluster${ var . cluster_name_suffix } "
37
37
regional = true
38
38
region = " ${ var . region } "
39
39
network = " ${ var . network } "
Original file line number Diff line number Diff line change @@ -22,6 +22,11 @@ variable "credentials_path" {
22
22
description = " The path to the GCP credentials JSON file"
23
23
}
24
24
25
+ variable "cluster_name_suffix" {
26
+ description = " A suffix to append to the default cluster name"
27
+ default = " "
28
+ }
29
+
25
30
variable "region" {
26
31
description = " The region to host the cluster in"
27
32
}
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ data "google_compute_subnetwork" "subnetwork" {
33
33
module "gke" {
34
34
source = " ../../"
35
35
project_id = " ${ var . project_id } "
36
- name = " ${ local . cluster_type } -cluster"
36
+ name = " ${ local . cluster_type } -cluster${ var . cluster_name_suffix } "
37
37
regional = false
38
38
region = " ${ var . region } "
39
39
zones = " ${ var . zones } "
Original file line number Diff line number Diff line change @@ -22,6 +22,11 @@ variable "credentials_path" {
22
22
description = " The path to the GCP credentials JSON file"
23
23
}
24
24
25
+ variable "cluster_name_suffix" {
26
+ description = " A suffix to append to the default cluster name"
27
+ default = " "
28
+ }
29
+
25
30
variable "region" {
26
31
description = " The region to host the cluster in"
27
32
}
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ module "example" {
19
19
20
20
project_id = " ${ var . project_id } "
21
21
credentials_path = " ${ local . credentials_path } "
22
+ cluster_name_suffix = " -${ random_string . suffix . result } "
22
23
region = " ${ var . region } "
23
24
network = " ${ google_compute_network . main . name } "
24
25
subnetwork = " ${ google_compute_subnetwork . main . name } "
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ module "example" {
19
19
20
20
project_id = " ${ var . project_id } "
21
21
credentials_path = " ${ local . credentials_path } "
22
+ cluster_name_suffix = " -${ random_string . suffix . result } "
22
23
region = " ${ var . region } "
23
24
zones = [" ${ var . zones } " ]
24
25
network = " ${ google_compute_network . main . name } "
You can’t perform that action at this time.
0 commit comments