File tree Expand file tree Collapse file tree 4 files changed +22
-1
lines changed Expand file tree Collapse file tree 4 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,15 @@ resource "google_container_cluster" "primary" {
37
37
38
38
master_authorized_networks_config = " ${ var . master_authorized_networks_config } "
39
39
40
+ master_auth {
41
+ username = " ${ local . cluster_basic_auth_username } "
42
+ password = " ${ local . cluster_basic_auth_password } "
43
+
44
+ client_certificate_config {
45
+ issue_client_certificate = " ${ var . issue_client_certificate } "
46
+ }
47
+ }
48
+
40
49
addons_config {
41
50
http_load_balancing {
42
51
disabled = " ${ var . http_load_balancing ? 0 : 1 } "
Original file line number Diff line number Diff line change @@ -37,6 +37,15 @@ resource "google_container_cluster" "zonal_primary" {
37
37
38
38
master_authorized_networks_config = " ${ var . master_authorized_networks_config } "
39
39
40
+ master_auth {
41
+ username = " ${ local . cluster_basic_auth_username } "
42
+ password = " ${ local . cluster_basic_auth_password } "
43
+
44
+ client_certificate_config {
45
+ issue_client_certificate = " ${ var . issue_client_certificate } "
46
+ }
47
+ }
48
+
40
49
addons_config {
41
50
http_load_balancing {
42
51
disabled = " ${ var . http_load_balancing ? 0 : 1 } "
Original file line number Diff line number Diff line change @@ -142,6 +142,9 @@ locals {
142
142
cluster_http_load_balancing_enabled = " ${ local . cluster_type_output_http_load_balancing_enabled [local . cluster_type ] ? false : true } "
143
143
cluster_horizontal_pod_autoscaling_enabled = " ${ local . cluster_type_output_horizontal_pod_autoscaling_enabled [local . cluster_type ] ? false : true } "
144
144
cluster_kubernetes_dashboard_enabled = " ${ local . cluster_type_output_kubernetes_dashboard_enabled [local . cluster_type ] ? false : true } "
145
+
146
+ cluster_basic_auth_username = " ${ var . enable_basic_auth ? var . basic_auth_username : " " } "
147
+ cluster_basic_auth_password = " ${ var . enable_basic_auth ? var . basic_auth_password : " " } "
145
148
}
146
149
147
150
/* *****************************************
Original file line number Diff line number Diff line change @@ -153,4 +153,4 @@ locals {
153
153
data "google_container_engine_versions" "region" {
154
154
zone = " ${ data . google_compute_zones . available . names [0 ]} "
155
155
project = " ${ var . project_id } "
156
- }
156
+ }
You can’t perform that action at this time.
0 commit comments