Skip to content

Commit db888e3

Browse files
coryodanielaaron-lane
authored andcommitted
adding master_auth to autogen
1 parent 0a4d65e commit db888e3

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

autogen/cluster_regional.tf

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

3939
master_authorized_networks_config = ["${var.master_authorized_networks_config}"]
4040

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+
4150
addons_config {
4251
http_load_balancing {
4352
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
@@ -38,6 +38,15 @@ resource "google_container_cluster" "zonal_primary" {
3838

3939
master_authorized_networks_config = ["${var.master_authorized_networks_config}"]
4040

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

autogen/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ locals {
145145
cluster_http_load_balancing_enabled = "${local.cluster_type_output_http_load_balancing_enabled[local.cluster_type] ? false : true}"
146146
cluster_horizontal_pod_autoscaling_enabled = "${local.cluster_type_output_horizontal_pod_autoscaling_enabled[local.cluster_type] ? false : true}"
147147
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 : ""}"
148151
}
149152

150153
/******************************************

main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ locals {
156156
data "google_container_engine_versions" "region" {
157157
provider = "google-beta"
158158
region = "${var.region}"
159-
project = "${var.project_id}"
160159
}
161160

162161
data "google_container_engine_versions" "zone" {

0 commit comments

Comments
 (0)