Skip to content

Commit 1455636

Browse files
rileykarsonmodular-magician
authored andcommitted
Fix GKE examples (#1844)
Merged PR #1844.
1 parent dd88035 commit 1455636

File tree

2 files changed

+12
-31
lines changed

2 files changed

+12
-31
lines changed

third_party/terraform/website/docs/r/container_cluster.html.markdown

+8-30
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,13 @@ resource "google_container_cluster" "primary" {
2929
remove_default_node_pool = true
3030
initial_node_count = 1
3131
32-
# Setting an empty username and password explicitly disables basic auth
3332
master_auth {
3433
username = ""
3534
password = ""
35+
36+
client_certificate_config {
37+
issue_client_certificate = false
38+
}
3639
}
3740
}
3841
@@ -56,20 +59,6 @@ resource "google_container_node_pool" "primary_preemptible_nodes" {
5659
]
5760
}
5861
}
59-
60-
# The following outputs allow authentication and connectivity to the GKE Cluster
61-
# by using certificate-based authentication.
62-
output "client_certificate" {
63-
value = "${google_container_cluster.primary.master_auth.0.client_certificate}"
64-
}
65-
66-
output "client_key" {
67-
value = "${google_container_cluster.primary.master_auth.0.client_key}"
68-
}
69-
70-
output "cluster_ca_certificate" {
71-
value = "${google_container_cluster.primary.master_auth.0.cluster_ca_certificate}"
72-
}
7362
```
7463

7564
## Example Usage - with the default node pool
@@ -80,10 +69,13 @@ resource "google_container_cluster" "primary" {
8069
location = "us-central1-a"
8170
initial_node_count = 3
8271
83-
# Setting an empty username and password explicitly disables basic auth
8472
master_auth {
8573
username = ""
8674
password = ""
75+
76+
client_certificate_config {
77+
issue_client_certificate = false
78+
}
8779
}
8880
8981
node_config {
@@ -108,20 +100,6 @@ resource "google_container_cluster" "primary" {
108100
update = "40m"
109101
}
110102
}
111-
112-
# The following outputs allow authentication and connectivity to the GKE Cluster
113-
# by using certificate-based authentication.
114-
output "client_certificate" {
115-
value = "${google_container_cluster.primary.master_auth.0.client_certificate}"
116-
}
117-
118-
output "client_key" {
119-
value = "${google_container_cluster.primary.master_auth.0.client_key}"
120-
}
121-
122-
output "cluster_ca_certificate" {
123-
value = "${google_container_cluster.primary.master_auth.0.cluster_ca_certificate}"
124-
}
125103
```
126104

127105
## Argument Reference

third_party/terraform/website/docs/r/container_node_pool.html.markdown

+4-1
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,13 @@ resource "google_container_cluster" "primary" {
6868
"us-central1-c",
6969
]
7070
71-
# Setting an empty username and password explicitly disables basic auth
7271
master_auth {
7372
username = ""
7473
password = ""
74+
75+
client_certificate_config {
76+
issue_client_certificate = false
77+
}
7578
}
7679
7780
node_config {

0 commit comments

Comments
 (0)