Skip to content

Commit ee58d26

Browse files
coryodanielaaron-lane
authored andcommitted
rebasing / merge conflicts
1 parent 0603464 commit ee58d26

File tree

11 files changed

+62
-16
lines changed

11 files changed

+62
-16
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
105105
| basic\_auth\_username | Kubernetes HTTP Basic auth username. Only used if `enable_basic_auth` is true | string | `""` | no |
106106
| description | The description of the cluster | string | `""` | no |
107107
| disable\_legacy\_metadata\_endpoints | Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated. | string | `"true"` | no |
108-
| enable\_basic\_auth | Basic authentication allows a user to authenticate to the cluster with a username and password. To maximize the security of your cluster, disable this option. Basic authentication is not recommended because it provides no confidentiality protection for transmitted credentials | string | `"true"` | no |
108+
| enable\_basic\_auth | Basic authentication allows a user to authenticate to the cluster with a username and password. To maximize the security of your cluster, disable this option. Basic authentication is not recommended because it provides no confidentiality protection for transmitted credentials | string | `"false"` | no |
109109
| horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | string | `"true"` | no |
110110
| http\_load\_balancing | Enable httpload balancer addon | string | `"true"` | no |
111111
| ip\_masq\_link\_local | Whether to masquerade traffic to the link-local prefix (169.254.0.0/16). | string | `"false"` | no |
@@ -342,4 +342,4 @@ are as follows:
342342
is a compiled language so there is no standard linter.
343343
* Terraform - terraform has a built-in linter in the 'terraform validate'
344344
command.
345-
* Dockerfiles - hadolint. Can be found in homebrew
345+
* Dockerfiles - hadolint. Can be found in homebrew

autogen/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ variable "master_ipv4_cidr_block" {
236236

237237
variable "enable_basic_auth" {
238238
description = "Basic authentication allows a user to authenticate to the cluster with a username and password. To maximize the security of your cluster, disable this option. Basic authentication is not recommended because it provides no confidentiality protection for transmitted credentials"
239-
default = "true"
239+
default = "false"
240240
}
241241

242242
variable "basic_auth_username" {

examples/disable_client_cert/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ To provision this example, run the following from within this directory:
4646
- `terraform init` to get the plugins
4747
- `terraform plan` to see the infrastructure plan
4848
- `terraform apply` to apply the infrastructure build
49-
- `terraform destroy` to destroy the built infrastructure
49+
- `terraform destroy` to destroy the built infrastructure

main.tf

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

161162
data "google_container_engine_versions" "zone" {

modules/private-cluster/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,11 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
106106

107107
| Name | Description | Type | Default | Required |
108108
|------|-------------|:----:|:-----:|:-----:|
109+
| basic\_auth\_password | Kubernetes HTTP Basic auth password. Only used if `enable_basic_auth` is true | string | `""` | no |
110+
| basic\_auth\_username | Kubernetes HTTP Basic auth username. Only used if `enable_basic_auth` is true | string | `""` | no |
109111
| description | The description of the cluster | string | `""` | no |
110112
| disable\_legacy\_metadata\_endpoints | Disable the /0.1/ and /v1beta1/ metadata server endpoints on the node. Changing this value will cause all node pools to be recreated. | string | `"true"` | no |
113+
| enable\_basic\_auth | Basic authentication allows a user to authenticate to the cluster with a username and password. To maximize the security of your cluster, disable this option. Basic authentication is not recommended because it provides no confidentiality protection for transmitted credentials | string | `"false"` | no |
111114
| enable\_private\_endpoint | (Beta) Whether the master's internal IP address is used as the cluster endpoint | string | `"false"` | no |
112115
| enable\_private\_nodes | (Beta) Whether nodes have internal IP addresses only | string | `"false"` | no |
113116
| horizontal\_pod\_autoscaling | Enable horizontal pod autoscaling addon | string | `"true"` | no |
@@ -116,6 +119,7 @@ In either case, upgrading to module version `v1.0.0` will trigger a recreation o
116119
| ip\_masq\_resync\_interval | The interval at which the agent attempts to sync its ConfigMap file from the disk. | string | `"60s"` | no |
117120
| ip\_range\_pods | The _name_ of the secondary subnet ip range to use for pods | string | n/a | yes |
118121
| ip\_range\_services | The _name_ of the secondary subnet range to use for services | string | n/a | yes |
122+
| issue\_client\_certificate | Issues a client certificate to authenticate to the cluster endpoint. To maximize the security of your cluster, leave this option disabled. Client certificates don't automatically rotate and aren't easily revocable. WARNING: changing this after cluster creation is destructive! | string | `"false"` | no |
119123
| kubernetes\_dashboard | Enable kubernetes dashboard addon | string | `"false"` | no |
120124
| kubernetes\_version | The Kubernetes version of the masters. If set to 'latest' it will pull latest available version in the selected region. | string | `"latest"` | no |
121125
| logging\_service | The logging service that the cluster should write logs to. Available options include logging.googleapis.com, logging.googleapis.com/kubernetes (beta), and none | string | `"logging.googleapis.com"` | no |

modules/private-cluster/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}"

modules/private-cluster/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}"

modules/private-cluster/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
/******************************************

modules/private-cluster/outputs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,5 @@ output "node_pools_versions" {
110110

111111
output "service_account" {
112112
description = "The service account to default running nodes as if not overridden in `node_pools`."
113-
value = "${local.service_account}"
114-
}
113+
value = "${local.service_account}"
114+
}

modules/private-cluster/variables.tf

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ variable "disable_legacy_metadata_endpoints" {
129129
default = "true"
130130
}
131131

132-
133132
variable "node_pools" {
134133
type = "list"
135134
description = "List of maps containing node pools"
@@ -217,17 +216,38 @@ variable "service_account" {
217216
description = "The service account to default running nodes as if not overridden in `node_pools`. Defaults to the compute engine default service account. May also specify `create` to automatically create a cluster-specific service account"
218217
default = ""
219218
}
219+
220220
variable "enable_private_endpoint" {
221-
description = "(Beta) Whether the master's internal IP address is used as the cluster endpoint"
222-
default = false
221+
description = "(Beta) Whether the master's internal IP address is used as the cluster endpoint"
222+
default = false
223223
}
224224

225225
variable "enable_private_nodes" {
226-
description = "(Beta) Whether nodes have internal IP addresses only"
227-
default = false
226+
description = "(Beta) Whether nodes have internal IP addresses only"
227+
default = false
228228
}
229229

230230
variable "master_ipv4_cidr_block" {
231-
description = "(Beta) The IP range in CIDR notation to use for the hosted master network"
232-
default = "10.0.0.0/28"
233-
}
231+
description = "(Beta) The IP range in CIDR notation to use for the hosted master network"
232+
default = "10.0.0.0/28"
233+
}
234+
235+
variable "enable_basic_auth" {
236+
description = "Basic authentication allows a user to authenticate to the cluster with a username and password. To maximize the security of your cluster, disable this option. Basic authentication is not recommended because it provides no confidentiality protection for transmitted credentials"
237+
default = "false"
238+
}
239+
240+
variable "basic_auth_username" {
241+
description = "Kubernetes HTTP Basic auth username. Only used if `enable_basic_auth` is true"
242+
default = ""
243+
}
244+
245+
variable "basic_auth_password" {
246+
description = "Kubernetes HTTP Basic auth password. Only used if `enable_basic_auth` is true"
247+
default = ""
248+
}
249+
250+
variable "issue_client_certificate" {
251+
description = "Issues a client certificate to authenticate to the cluster endpoint. To maximize the security of your cluster, leave this option disabled. Client certificates don't automatically rotate and aren't easily revocable. WARNING: changing this after cluster creation is destructive!"
252+
default = "false"
253+
}

outputs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,5 @@ output "node_pools_versions" {
110110

111111
output "service_account" {
112112
description = "The service account to default running nodes as if not overridden in `node_pools`."
113-
value = "${local.service_account}"
114-
}
113+
value = "${local.service_account}"
114+
}

0 commit comments

Comments
 (0)