diff --git a/modules/gke-cluster-autopilot/README.md b/modules/gke-cluster-autopilot/README.md
index 0091d6e0..7fd0faf9 100644
--- a/modules/gke-cluster-autopilot/README.md
+++ b/modules/gke-cluster-autopilot/README.md
@@ -209,7 +209,7 @@ module "cluster-1" {
| [location](variables.tf#L113) | Autopilot clusters are always regional. | string
| ✓ | |
| [name](variables.tf#L190) | Cluster name. | string
| ✓ | |
| [project_id](variables.tf#L226) | Cluster project ID. | string
| ✓ | |
-| [vpc_config](variables.tf#L242) | VPC-level configuration. | object({…})
| ✓ | |
+| [vpc_config](variables.tf#L242) | VPC-level configuration. | object({…})
| ✓ | |
| [backup_configs](variables.tf#L17) | Configuration for Backup for GKE. | object({…})
| | {}
|
| [deletion_protection](variables.tf#L38) | Whether or not to allow Terraform to destroy the cluster. Unless this field is set to false in Terraform state, a terraform destroy or terraform apply that would delete the cluster will fail. | bool
| | true
|
| [description](variables.tf#L45) | Cluster description. | string
| | null
|
diff --git a/modules/gke-cluster-autopilot/main.tf b/modules/gke-cluster-autopilot/main.tf
index 6824d223..d4288053 100644
--- a/modules/gke-cluster-autopilot/main.tf
+++ b/modules/gke-cluster-autopilot/main.tf
@@ -121,6 +121,12 @@ resource "google_container_cluster" "cluster" {
cluster_ipv4_cidr_block = var.vpc_config.secondary_range_blocks.pods
services_ipv4_cidr_block = var.vpc_config.secondary_range_blocks.services
stack_type = var.vpc_config.stack_type
+ dynamic "additional_pod_ranges_config" {
+ for_each = var.vpc_config.additional_ranges != null ? [""] : []
+ content {
+ pod_range_names = var.vpc_config.additional_ranges
+ }
+ }
}
}
@@ -130,6 +136,12 @@ resource "google_container_cluster" "cluster" {
cluster_secondary_range_name = var.vpc_config.secondary_range_names.pods
services_secondary_range_name = var.vpc_config.secondary_range_names.services
stack_type = var.vpc_config.stack_type
+ dynamic "additional_pod_ranges_config" {
+ for_each = var.vpc_config.additional_ranges != null ? [""] : []
+ content {
+ pod_range_names = var.vpc_config.additional_ranges
+ }
+ }
}
}
diff --git a/modules/gke-cluster-autopilot/variables.tf b/modules/gke-cluster-autopilot/variables.tf
index a31596a6..fcf5f3ff 100644
--- a/modules/gke-cluster-autopilot/variables.tf
+++ b/modules/gke-cluster-autopilot/variables.tf
@@ -253,6 +253,7 @@ variable "vpc_config" {
pods = optional(string, "pods")
services = optional(string, "services")
}))
+ additional_ranges = optional(list(string))
master_authorized_ranges = optional(map(string))
stack_type = optional(string)
})
diff --git a/modules/gke-cluster-standard/README.md b/modules/gke-cluster-standard/README.md
index 3d00b8c9..8b487d6a 100644
--- a/modules/gke-cluster-standard/README.md
+++ b/modules/gke-cluster-standard/README.md
@@ -311,9 +311,9 @@ module "cluster-1" {
| name | description | type | required | default |
|---|---|:---:|:---:|:---:|
| [location](variables.tf#L237) | Cluster zone or region. | string
| ✓ | |
-| [name](variables.tf#L372) | Cluster name. | string
| ✓ | |
-| [project_id](variables.tf#L411) | Cluster project id. | string
| ✓ | |
-| [vpc_config](variables.tf#L422) | VPC-level configuration. | object({…})
| ✓ | |
+| [name](variables.tf#L371) | Cluster name. | string
| ✓ | |
+| [project_id](variables.tf#L410) | Cluster project id. | string
| ✓ | |
+| [vpc_config](variables.tf#L421) | VPC-level configuration. | object({…})
| ✓ | |
| [backup_configs](variables.tf#L17) | Configuration for Backup for GKE. | object({…})
| | {}
|
| [cluster_autoscaling](variables.tf#L39) | Enable and configure limits for Node Auto-Provisioning with Cluster Autoscaler. | object({…})
| | null
|
| [default_nodepool](variables.tf#L118) | Enable default nodepool. | object({…})
| | {}
|
@@ -327,11 +327,11 @@ module "cluster-1" {
| [maintenance_config](variables.tf#L263) | Maintenance window configuration. | object({…})
| | {…}
|
| [max_pods_per_node](variables.tf#L286) | Maximum number of pods per node in this cluster. | number
| | 110
|
| [min_master_version](variables.tf#L292) | Minimum version of the master, defaults to the version of the most recent official release. | string
| | null
|
-| [monitoring_config](variables.tf#L298) | Monitoring configuration. Google Cloud Managed Service for Prometheus is enabled by default. | object({…})
| | {}
|
-| [node_config](variables.tf#L377) | Node-level configuration. | object({…})
| | {}
|
-| [node_locations](variables.tf#L390) | Zones in which the cluster's nodes are located. | list(string)
| | []
|
-| [private_cluster_config](variables.tf#L397) | Private cluster configuration. | object({…})
| | null
|
-| [release_channel](variables.tf#L416) | Release channel for GKE upgrades. | string
| | null
|
+| [monitoring_config](variables.tf#L298) | Monitoring configuration. Google Cloud Managed Service for Prometheus is enabled by default. | object({…})
| | {}
|
+| [node_config](variables.tf#L376) | Node-level configuration. | object({…})
| | {}
|
+| [node_locations](variables.tf#L389) | Zones in which the cluster's nodes are located. | list(string)
| | []
|
+| [private_cluster_config](variables.tf#L396) | Private cluster configuration. | object({…})
| | null
|
+| [release_channel](variables.tf#L415) | Release channel for GKE upgrades. | string
| | null
|
## Outputs
diff --git a/modules/gke-cluster-standard/main.tf b/modules/gke-cluster-standard/main.tf
index c76c192e..3ba51765 100644
--- a/modules/gke-cluster-standard/main.tf
+++ b/modules/gke-cluster-standard/main.tf
@@ -272,6 +272,12 @@ resource "google_container_cluster" "cluster" {
var.vpc_config.secondary_range_blocks.services
)
stack_type = var.vpc_config.stack_type
+ dynamic "additional_pod_ranges_config" {
+ for_each = var.vpc_config.additional_ranges != null ? [""] : []
+ content {
+ pod_range_names = var.vpc_config.additional_ranges
+ }
+ }
}
}
dynamic "ip_allocation_policy" {
@@ -284,6 +290,12 @@ resource "google_container_cluster" "cluster" {
var.vpc_config.secondary_range_names.services
)
stack_type = var.vpc_config.stack_type
+ dynamic "additional_pod_ranges_config" {
+ for_each = var.vpc_config.additional_ranges != null ? [""] : []
+ content {
+ pod_range_names = var.vpc_config.additional_ranges
+ }
+ }
}
}
# Send GKE cluster logs from chosen sources to Cloud Logging.
@@ -409,9 +421,6 @@ resource "google_container_cluster" "cluster" {
enable_relay = (
var.monitoring_config.advanced_datapath_observability.enable_relay
)
- relay_mode = (
- var.monitoring_config.advanced_datapath_observability.relay_mode
- )
}
}
}
diff --git a/modules/gke-cluster-standard/variables.tf b/modules/gke-cluster-standard/variables.tf
index 017db18a..ee9021d0 100644
--- a/modules/gke-cluster-standard/variables.tf
+++ b/modules/gke-cluster-standard/variables.tf
@@ -315,7 +315,6 @@ variable "monitoring_config" {
advanced_datapath_observability = optional(object({
enable_metrics = bool
enable_relay = optional(bool)
- relay_mode = optional(string)
}))
})
default = {}
@@ -433,6 +432,7 @@ variable "vpc_config" {
pods = optional(string, "pods")
services = optional(string, "services")
}))
+ additional_ranges = optional(list(string))
master_authorized_ranges = optional(map(string))
stack_type = optional(string)
})