diff --git a/modules/gke-cluster/README.md b/modules/gke-cluster/README.md index be0a9f62f3..07e9f45b12 100644 --- a/modules/gke-cluster/README.md +++ b/modules/gke-cluster/README.md @@ -76,24 +76,24 @@ module "cluster-1" { | name | description | type | required | default | |---|---|:---:|:---:|:---:| -| [location](variables.tf#L117) | Cluster zone or region. | string | ✓ | | -| [name](variables.tf#L169) | Cluster name. | string | ✓ | | -| [project_id](variables.tf#L195) | Cluster project id. | string | ✓ | | -| [vpc_config](variables.tf#L206) | VPC-level configuration. | object({…}) | ✓ | | +| [location](variables.tf#L118) | Cluster zone or region. | string | ✓ | | +| [name](variables.tf#L170) | Cluster name. | string | ✓ | | +| [project_id](variables.tf#L196) | Cluster project id. | string | ✓ | | +| [vpc_config](variables.tf#L207) | VPC-level configuration. | object({…}) | ✓ | | | [cluster_autoscaling](variables.tf#L17) | Enable and configure limits for Node Auto-Provisioning with Cluster Autoscaler. | object({…}) | | null | | [description](variables.tf#L38) | Cluster description. | string | | null | | [enable_addons](variables.tf#L44) | Addons enabled in the cluster (true means enabled). | object({…}) | | {…} | -| [enable_features](variables.tf#L68) | Enable cluster-level features. Certain features allow configuration. | object({…}) | | {…} | -| [issue_client_certificate](variables.tf#L105) | Enable issuing client certificate. | bool | | false | -| [labels](variables.tf#L111) | Cluster resource labels. | map(string) | | null | -| [logging_config](variables.tf#L122) | Logging configuration. | list(string) | | ["SYSTEM_COMPONENTS"] | -| [maintenance_config](variables.tf#L128) | Maintenance window configuration. | object({…}) | | {…} | -| [max_pods_per_node](variables.tf#L151) | Maximum number of pods per node in this cluster. | number | | 110 | -| [min_master_version](variables.tf#L157) | Minimum version of the master, defaults to the version of the most recent official release. | string | | null | -| [monitoring_config](variables.tf#L163) | Monitoring components. | list(string) | | ["SYSTEM_COMPONENTS"] | -| [node_locations](variables.tf#L174) | Zones in which the cluster's nodes are located. | list(string) | | [] | -| [private_cluster_config](variables.tf#L181) | Private cluster configuration. | object({…}) | | null | -| [release_channel](variables.tf#L200) | Release channel for GKE upgrades. | string | | null | +| [enable_features](variables.tf#L68) | Enable cluster-level features. Certain features allow configuration. | object({…}) | | {…} | +| [issue_client_certificate](variables.tf#L106) | Enable issuing client certificate. | bool | | false | +| [labels](variables.tf#L112) | Cluster resource labels. | map(string) | | null | +| [logging_config](variables.tf#L123) | Logging configuration. | list(string) | | ["SYSTEM_COMPONENTS"] | +| [maintenance_config](variables.tf#L129) | Maintenance window configuration. | object({…}) | | {…} | +| [max_pods_per_node](variables.tf#L152) | Maximum number of pods per node in this cluster. | number | | 110 | +| [min_master_version](variables.tf#L158) | Minimum version of the master, defaults to the version of the most recent official release. | string | | null | +| [monitoring_config](variables.tf#L164) | Monitoring components. | list(string) | | ["SYSTEM_COMPONENTS"] | +| [node_locations](variables.tf#L175) | Zones in which the cluster's nodes are located. | list(string) | | [] | +| [private_cluster_config](variables.tf#L182) | Private cluster configuration. | object({…}) | | null | +| [release_channel](variables.tf#L201) | Release channel for GKE upgrades. | string | | null | ## Outputs diff --git a/modules/gke-cluster/main.tf b/modules/gke-cluster/main.tf index 9981d9b4eb..f86c226c29 100644 --- a/modules/gke-cluster/main.tf +++ b/modules/gke-cluster/main.tf @@ -46,6 +46,8 @@ resource "google_container_cluster" "cluster" { : "DATAPATH_PROVIDER_UNSPECIFIED" ) enable_autopilot = var.enable_features.autopilot ? true : null + managed_prometheus = var.enable_features.managed_prometheus ? true : null + # the default nodepool is deleted here, use the gke-nodepool module instead # node_config {} diff --git a/modules/gke-cluster/variables.tf b/modules/gke-cluster/variables.tf index a227d5c730..c0e59d2206 100644 --- a/modules/gke-cluster/variables.tf +++ b/modules/gke-cluster/variables.tf @@ -89,8 +89,9 @@ variable "enable_features" { enable_network_egress_metering = optional(bool) enable_resource_consumption_metering = optional(bool) })) - shielded_nodes = optional(bool, false) - tpu = optional(bool, false) + managed_prometheus = optional(bool, false) + shielded_nodes = optional(bool, false) + tpu = optional(bool, false) upgrade_notifications = optional(object({ topic_id = optional(string) })) diff --git a/tests/modules/gke_cluster/fixture/variables.tf b/tests/modules/gke_cluster/fixture/variables.tf index 1b539d20b3..da3afd123d 100644 --- a/tests/modules/gke_cluster/fixture/variables.tf +++ b/tests/modules/gke_cluster/fixture/variables.tf @@ -25,6 +25,7 @@ variable "enable_addons" { variable "enable_features" { type = any default = { - workload_identity = true + workload_identity = true + managed_prometheus = true } }