Skip to content

Commit 5980f77

Browse files
committed
fix: no pod_ranges for autopilot clusters2
1 parent 48d71f4 commit 5980f77

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

autogen/main/main.tf.tmpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ locals {
8888
cluster_alias_ranges_cidr = var.add_cluster_firewall_rules ? { for range in toset(data.google_compute_subnetwork.gke_subnetwork[0].secondary_ip_range) : range.range_name => range.ip_cidr_range } : {}
8989
{% if autopilot_cluster != true %}
9090
pod_all_ip_ranges = var.add_cluster_firewall_rules ? compact(concat([local.cluster_alias_ranges_cidr[var.ip_range_pods]], [for k, v in merge(local.node_pools, local.windows_node_pools): local.cluster_alias_ranges_cidr[v.pod_range] if length(lookup(v, "pod_range", "")) > 0] )) : []
91+
{% else %}
92+
pod_all_ip_ranges = var.add_cluster_firewall_rules ? [local.cluster_alias_ranges_cidr[var.ip_range_pods] : []
93+
{% endif %}
9194

95+
{% if autopilot_cluster != true %}
9296
cluster_network_policy = var.network_policy ? [{
9397
enabled = true
9498
provider = var.network_policy_provider

0 commit comments

Comments
 (0)