@@ -29,10 +29,13 @@ resource "google_container_cluster" "primary" {
29
29
remove_default_node_pool = true
30
30
initial_node_count = 1
31
31
32
- # Setting an empty username and password explicitly disables basic auth
33
32
master_auth {
34
33
username = ""
35
34
password = ""
35
+
36
+ client_certificate_config {
37
+ issue_client_certificate = false
38
+ }
36
39
}
37
40
}
38
41
@@ -56,20 +59,6 @@ resource "google_container_node_pool" "primary_preemptible_nodes" {
56
59
]
57
60
}
58
61
}
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
- }
73
62
```
74
63
75
64
## Example Usage - with the default node pool
@@ -80,10 +69,13 @@ resource "google_container_cluster" "primary" {
80
69
location = "us-central1-a"
81
70
initial_node_count = 3
82
71
83
- # Setting an empty username and password explicitly disables basic auth
84
72
master_auth {
85
73
username = ""
86
74
password = ""
75
+
76
+ client_certificate_config {
77
+ issue_client_certificate = false
78
+ }
87
79
}
88
80
89
81
node_config {
@@ -108,20 +100,6 @@ resource "google_container_cluster" "primary" {
108
100
update = "40m"
109
101
}
110
102
}
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
- }
125
103
```
126
104
127
105
## Argument Reference
0 commit comments