diff --git a/modules/gke-cluster/README.md b/modules/gke-cluster/README.md index fc2e3b37..caf1fec9 100644 --- a/modules/gke-cluster/README.md +++ b/modules/gke-cluster/README.md @@ -79,7 +79,7 @@ module "cluster-1" { | [location](variables.tf#L117) | Cluster zone or region. | string | ✓ | | | [name](variables.tf#L174) | Cluster name. | string | ✓ | | | [project_id](variables.tf#L200) | Cluster project id. | string | ✓ | | -| [vpc_config](variables.tf#L211) | VPC-level configuration. | object({…}) | ✓ | | +| [vpc_config](variables.tf#L217) | 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({…}) | | {…} | @@ -94,6 +94,7 @@ module "cluster-1" { | [node_locations](variables.tf#L179) | Zones in which the cluster's nodes are located. | list(string) | | [] | | [private_cluster_config](variables.tf#L186) | Private cluster configuration. | object({…}) | | null | | [release_channel](variables.tf#L205) | Release channel for GKE upgrades. | string | | null | +| [tags](variables.tf#L211) | Network tags applied to nodes. | list(string) | | null | ## Outputs diff --git a/modules/gke-cluster/main.tf b/modules/gke-cluster/main.tf index 5b5cd95f..d529cb42 100644 --- a/modules/gke-cluster/main.tf +++ b/modules/gke-cluster/main.tf @@ -63,6 +63,7 @@ resource "google_container_cluster" "cluster" { enable_integrity_monitoring = true } } + tags = var.tags } diff --git a/modules/gke-cluster/variables.tf b/modules/gke-cluster/variables.tf index 62d871e9..72f7fc14 100644 --- a/modules/gke-cluster/variables.tf +++ b/modules/gke-cluster/variables.tf @@ -208,6 +208,12 @@ variable "release_channel" { default = null } +variable "tags" { + description = "Network tags applied to nodes." + type = list(string) + default = null +} + variable "vpc_config" { description = "VPC-level configuration." type = object({ diff --git a/tests/modules/gke_cluster/fixture/main.tf b/tests/modules/gke_cluster/fixture/main.tf index 4ac38e16..5e11fbd7 100644 --- a/tests/modules/gke_cluster/fixture/main.tf +++ b/tests/modules/gke_cluster/fixture/main.tf @@ -25,4 +25,5 @@ module "test" { } enable_addons = var.enable_addons enable_features = var.enable_features + tags = var.tags } diff --git a/tests/modules/gke_cluster/fixture/variables.tf b/tests/modules/gke_cluster/fixture/variables.tf index 97fc6a63..2104e452 100644 --- a/tests/modules/gke_cluster/fixture/variables.tf +++ b/tests/modules/gke_cluster/fixture/variables.tf @@ -35,3 +35,9 @@ variable "monitoring_config" { managed_prometheus = true } } + +variable "tags" { + description = "Network tags applied to nodes." + type = list(string) + default = null +}