Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rosmo committed Oct 19, 2021
1 parent f8f228a commit 0f51702
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
8 changes: 4 additions & 4 deletions autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,19 @@ resource "google_container_cluster" "primary" {
}
logging_service = local.cluster_telemetry_type_is_set ? null : var.logging_service
dynamic "logging_config" {
for_each = length(var.logging_config) > 0 ? [1] : []
for_each = length(var.logging_enabled_components) > 0 ? [1] : []

content {
enable_components = var.logging_config
enable_components = var.logging_enabled_components
}
}

monitoring_service = local.cluster_telemetry_type_is_set ? null : var.monitoring_service
dynamic "monitoring_config" {
for_each = length(var.monitoring_config) > 0 ? [1] : []
for_each = length(var.monitoring_enabled_components) > 0 ? [1] : []

content {
enable_components = var.monitoring_config
enable_components = var.monitoring_enabled_components
}
}
{% else %}
Expand Down
12 changes: 8 additions & 4 deletions autogen/main/variables.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -349,24 +349,28 @@ variable "logging_service" {
default = "logging.googleapis.com/kubernetes"
}

variable "logging_config" {
{% if beta_cluster %}
variable "logging_enabled_components" {
type = list(string)
description = "List of services to monitor: SYSTEM_COMPONENTS"
description = "List of services to monitor: SYSTEM_COMPONENTS, WORKLOADS. Empty list is default GKE configuration."
default = []
}

{% endif %}
variable "monitoring_service" {
type = string
description = "The monitoring service that the cluster should write metrics to. Automatically send metrics from pods in the cluster to the Google Cloud Monitoring API. VM metrics will be collected by Google Compute Engine regardless of this setting Available options include monitoring.googleapis.com, monitoring.googleapis.com/kubernetes (beta) and none"
default = "monitoring.googleapis.com/kubernetes"
}

variable "monitoring_config" {
{% if beta_cluster %}
variable "monitoring_enabled_components" {
type = list(string)
description = "List of services to monitor: SYSTEM_COMPONENTS and/or WORKLOADS"
description = "List of services to monitor: SYSTEM_COMPONENTS, WORKLOADS (provider version >= 3.89.0). Empty list is default GKE configuration."
default = []
}

{% endif %}
variable "create_service_account" {
type = bool
description = "Defines if service account specified to run nodes should be created."
Expand Down

0 comments on commit 0f51702

Please sign in to comment.