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