Skip to content

Commit

Permalink
Fix GKE examples
Browse files Browse the repository at this point in the history
  • Loading branch information
rileykarson committed May 29, 2019
1 parent 7add060 commit aab02ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ resource "google_container_cluster" "primary" {
remove_default_node_pool = true
initial_node_count = 1
# Setting an empty username and password explicitly disables basic auth
master_auth {
username = ""
password = ""
client_certificate_config {
issue_client_certificate = false
}
}
}
Expand All @@ -56,20 +59,6 @@ resource "google_container_node_pool" "primary_preemptible_nodes" {
]
}
}
# The following outputs allow authentication and connectivity to the GKE Cluster
# by using certificate-based authentication.
output "client_certificate" {
value = "${google_container_cluster.primary.master_auth.0.client_certificate}"
}
output "client_key" {
value = "${google_container_cluster.primary.master_auth.0.client_key}"
}
output "cluster_ca_certificate" {
value = "${google_container_cluster.primary.master_auth.0.cluster_ca_certificate}"
}
```

## Example Usage - with the default node pool
Expand All @@ -80,10 +69,13 @@ resource "google_container_cluster" "primary" {
location = "us-central1-a"
initial_node_count = 3
# Setting an empty username and password explicitly disables basic auth
master_auth {
username = ""
password = ""
client_certificate_config {
issue_client_certificate = false
}
}
node_config {
Expand All @@ -108,20 +100,6 @@ resource "google_container_cluster" "primary" {
update = "40m"
}
}
# The following outputs allow authentication and connectivity to the GKE Cluster
# by using certificate-based authentication.
output "client_certificate" {
value = "${google_container_cluster.primary.master_auth.0.client_certificate}"
}
output "client_key" {
value = "${google_container_cluster.primary.master_auth.0.client_key}"
}
output "cluster_ca_certificate" {
value = "${google_container_cluster.primary.master_auth.0.cluster_ca_certificate}"
}
```

## Argument Reference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,13 @@ resource "google_container_cluster" "primary" {
"us-central1-c",
]
# Setting an empty username and password explicitly disables basic auth
master_auth {
username = ""
password = ""
client_certificate_config {
issue_client_certificate = false
}
}
node_config {
Expand Down

0 comments on commit aab02ec

Please sign in to comment.