File tree Expand file tree Collapse file tree 8 files changed +24
-0
lines changed Expand file tree Collapse file tree 8 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ Then perform the following commands on the root folder:
97
97
98
98
| Name | Description | Type | Default | Required |
99
99
| ------| -------------| :----:| :-----:| :-----:|
100
+ | cluster_resource_labels | Map containing cluster labels. Maximum of 64 labels | map | ` <map> ` | no |
100
101
| description | The description of the cluster | string | `` | no |
101
102
| horizontal_pod_autoscaling | Enable horizontal pod autoscaling addon | string | ` true ` | no |
102
103
| http_load_balancing | Enable httpload balancer addon | string | ` true ` | no |
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ resource "google_container_cluster" "primary" {
25
25
name = " ${ var . name } "
26
26
description = " ${ var . description } "
27
27
project = " ${ var . project_id } "
28
+ resource_labels = " ${ var . cluster_resource_labels } "
28
29
29
30
region = " ${ var . region } "
30
31
additional_zones = [" ${ coalescelist (compact (var. zones ), sort (random_shuffle. available_zones . result ))} " ]
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ resource "google_container_cluster" "zonal_primary" {
25
25
name = " ${ var . name } "
26
26
description = " ${ var . description } "
27
27
project = " ${ var . project_id } "
28
+ resource_labels = " ${ var . cluster_resource_labels } "
28
29
29
30
zone = " ${ var . zones [0 ]} "
30
31
additional_zones = [" ${ slice (var. zones ,1 ,length (var. zones ))} " ]
Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ Then perform the following commands on the root folder:
100
100
101
101
| Name | Description | Type | Default | Required |
102
102
| ------| -------------| :----:| :-----:| :-----:|
103
+ | cluster_resource_labels | Map containing cluster labels. Maximum of 64 labels | map | ` <map> ` | no |
103
104
| description | The description of the cluster | string | `` | no |
104
105
| enable_private_endpoint | (Beta) Whether the master's internal IP address is used as the cluster endpoint | string | ` false ` | no |
105
106
| enable_private_nodes | (Beta) Whether nodes have internal IP addresses only | string | ` false ` | no |
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ resource "google_container_cluster" "primary" {
25
25
name = " ${ var . name } "
26
26
description = " ${ var . description } "
27
27
project = " ${ var . project_id } "
28
+ resource_labels = " ${ var . cluster_resource_labels } "
28
29
29
30
region = " ${ var . region } "
30
31
additional_zones = [" ${ coalescelist (compact (var. zones ), sort (random_shuffle. available_zones . result ))} " ]
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ resource "google_container_cluster" "zonal_primary" {
25
25
name = " ${ var . name } "
26
26
description = " ${ var . description } "
27
27
project = " ${ var . project_id } "
28
+ resource_labels = " ${ var . cluster_resource_labels } "
28
29
29
30
zone = " ${ var . zones [0 ]} "
30
31
additional_zones = [" ${ slice (var. zones ,1 ,length (var. zones ))} " ]
Original file line number Diff line number Diff line change @@ -29,6 +29,15 @@ variable "description" {
29
29
default = " "
30
30
}
31
31
32
+ variable "cluster_resource_labels" {
33
+ type = " map"
34
+ description = " Map containing cluster labels. Maximum of 64 labels"
35
+
36
+ default = {
37
+ created-by = " terraform"
38
+ }
39
+ }
40
+
32
41
variable "regional" {
33
42
description = " Whether is a regional cluster (zonal cluster if set false. WARNING: changing this after cluster creation is destructive!)"
34
43
default = true
Original file line number Diff line number Diff line change @@ -29,6 +29,15 @@ variable "description" {
29
29
default = " "
30
30
}
31
31
32
+ variable "cluster_resource_labels" {
33
+ type = " map"
34
+ description = " Map containing cluster labels. Maximum of 64 labels"
35
+
36
+ default = {
37
+ created-by = " terraform"
38
+ }
39
+ }
40
+
32
41
variable "regional" {
33
42
description = " Whether is a regional cluster (zonal cluster if set false. WARNING: changing this after cluster creation is destructive!)"
34
43
default = true
You can’t perform that action at this time.
0 commit comments