Skip to content

Commit 2b599ff

Browse files
committed
adding master_auth to autogen
1 parent 7f91489 commit 2b599ff

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

autogen/cluster_regional.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ resource "google_container_cluster" "primary" {
3737

3838
master_authorized_networks_config = "${var.master_authorized_networks_config}"
3939

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+
4049
addons_config {
4150
http_load_balancing {
4251
disabled = "${var.http_load_balancing ? 0 : 1}"

autogen/cluster_zonal.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ resource "google_container_cluster" "zonal_primary" {
3737

3838
master_authorized_networks_config = "${var.master_authorized_networks_config}"
3939

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+
4049
addons_config {
4150
http_load_balancing {
4251
disabled = "${var.http_load_balancing ? 0 : 1}"

autogen/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ locals {
142142
cluster_http_load_balancing_enabled = "${local.cluster_type_output_http_load_balancing_enabled[local.cluster_type] ? false : true}"
143143
cluster_horizontal_pod_autoscaling_enabled = "${local.cluster_type_output_horizontal_pod_autoscaling_enabled[local.cluster_type] ? false : true}"
144144
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 : ""}"
145148
}
146149

147150
/******************************************

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,4 @@ locals {
153153
data "google_container_engine_versions" "region" {
154154
zone = "${data.google_compute_zones.available.names[0]}"
155155
project = "${var.project_id}"
156-
}
156+
}

0 commit comments

Comments
 (0)