diff --git a/third_party/terraform/resources/resource_container_cluster.go.erb b/third_party/terraform/resources/resource_container_cluster.go.erb index 07c8e717b8c9..a239461e4669 100644 --- a/third_party/terraform/resources/resource_container_cluster.go.erb +++ b/third_party/terraform/resources/resource_container_cluster.go.erb @@ -394,7 +394,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), }, @@ -531,7 +531,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 c765a486645f..c4ad0ff02dc6 100644 --- a/third_party/terraform/tests/resource_container_cluster_test.go.erb +++ b/third_party/terraform/tests/resource_container_cluster_test.go.erb @@ -1909,8 +1909,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 dee03452f12d..6922bcbb2317 100644 --- a/third_party/terraform/website/docs/r/container_cluster.html.markdown +++ b/third_party/terraform/website/docs/r/container_cluster.html.markdown @@ -187,7 +187,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. @@ -224,7 +224,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 @@ -544,9 +544,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)