Skip to content

Commit

Permalink
fix: inline network config
Browse files Browse the repository at this point in the history
  • Loading branch information
KarimDarwish committed Feb 12, 2024
1 parent 9292bf9 commit d45613e
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -535,15 +535,10 @@ resource "google_container_node_pool" "pools" {
}
}

dynamic "network_config" {
for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : []
content {
pod_range = lookup(network_config.value, "pod_range", null)
enable_private_nodes = lookup(network_config.value, "enable_private_nodes", null)
}
}

network_config {
pod_range = lookup(each.value, "pod_range", null)
enable_private_nodes = lookup(each.value, "enable_private_nodes", null)

dynamic "additional_node_network_configs" {
for_each = {for idx, x in lookup(var.node_pools_additional_networks, each.value["name"], []) : idx => x}
iterator = additional_network
Expand Down

0 comments on commit d45613e

Please sign in to comment.