From 1258a350213f7ce14305e51b6bc30255a5f6450f Mon Sep 17 00:00:00 2001 From: Riley Karson Date: Tue, 15 Oct 2019 13:00:50 -0700 Subject: [PATCH] Set GKE Stackdriver defaults to GKE Stackdriver Monitoring --- .../terraform/resources/resource_container_cluster.go.erb | 4 ++-- .../tests/resource_container_cluster_test.go.erb | 4 ++-- .../website/docs/r/container_cluster.html.markdown | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/third_party/terraform/resources/resource_container_cluster.go.erb b/third_party/terraform/resources/resource_container_cluster.go.erb index 46abceeb9bbe..8611af9dcef4 100644 --- a/third_party/terraform/resources/resource_container_cluster.go.erb +++ b/third_party/terraform/resources/resource_container_cluster.go.erb @@ -369,7 +369,7 @@ func resourceContainerCluster() *schema.Resource { "logging_service": { Type: schema.TypeString, Optional: true, - Computed: true, + Default: "logging.googleapis.com/kubernetes", ValidateFunc: validation.StringInSlice([]string{"logging.googleapis.com", "logging.googleapis.com/kubernetes", "none"}, false), }, @@ -475,7 +475,7 @@ func resourceContainerCluster() *schema.Resource { "monitoring_service": { Type: schema.TypeString, Optional: true, - Computed: true, + Default: "monitoring.googleapis.com/kubernetes", ValidateFunc: validation.StringInSlice([]string{"monitoring.googleapis.com", "monitoring.googleapis.com/kubernetes", "none"}, false), }, diff --git a/third_party/terraform/tests/resource_container_cluster_test.go.erb b/third_party/terraform/tests/resource_container_cluster_test.go.erb index 2d30bc2579fc..69378a5bf640 100644 --- a/third_party/terraform/tests/resource_container_cluster_test.go.erb +++ b/third_party/terraform/tests/resource_container_cluster_test.go.erb @@ -1789,8 +1789,8 @@ resource "google_container_cluster" "primary" { enable_kubernetes_alpha = true enable_legacy_abac = true - logging_service = "logging.googleapis.com/kubernetes" - monitoring_service = "monitoring.googleapis.com/kubernetes" + logging_service = "logging.googleapis.com" + monitoring_service = "monitoring.googleapis.com" resource_labels = { created-by = "terraform" diff --git a/third_party/terraform/website/docs/r/container_cluster.html.markdown b/third_party/terraform/website/docs/r/container_cluster.html.markdown index 1889219653c3..b9ec2747bb4a 100644 --- a/third_party/terraform/website/docs/r/container_cluster.html.markdown +++ b/third_party/terraform/website/docs/r/container_cluster.html.markdown @@ -186,7 +186,7 @@ set this to a value of at least `1`, alongside setting * `logging_service` - (Optional) The logging service that the cluster should write logs to. Available options include `logging.googleapis.com`, - `logging.googleapis.com/kubernetes`, and `none`. Defaults to `logging.googleapis.com` + `logging.googleapis.com/kubernetes`, and `none`. Defaults to `logging.googleapis.com/kubernetes` * `maintenance_policy` - (Optional) The maintenance policy to use for the cluster. Structure is documented below. @@ -223,7 +223,7 @@ region are guaranteed to support the same version. VM metrics will be collected by Google Compute Engine regardless of this setting Available options include `monitoring.googleapis.com`, `monitoring.googleapis.com/kubernetes`, and `none`. - Defaults to `monitoring.googleapis.com` + Defaults to `monitoring.googleapis.com/kubernetes` * `network` - (Optional) The name or self_link of the Google Compute Engine network to which the cluster is connected. For Shared VPC, set this to the self link of the @@ -519,9 +519,9 @@ The `node_config` block supports: Note this will grant read access to ALL GCS content unless you also specify a custom role. See https://cloud.google.com/kubernetes-engine/docs/how-to/access-scopes * `logging-write` (`https://www.googleapis.com/auth/logging.write`), - if `logging_service` points to Google + if `logging_service` is not `none`. * `monitoring` (`https://www.googleapis.com/auth/monitoring`), - if `monitoring_service` points to Google + if `monitoring_service` is not `none`. * `preemptible` - (Optional) A boolean that represents whether or not the underlying node VMs are preemptible. See the [official documentation](https://cloud.google.com/container-engine/docs/preemptible-vm)