Skip to content

Commit

Permalink
updates to beta cluster only
Browse files Browse the repository at this point in the history
  • Loading branch information
g-awmalik committed Sep 7, 2022
1 parent b9287de commit 122bcd0
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 0 deletions.
9 changes: 9 additions & 0 deletions autogen/main/cluster.tf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,15 @@ resource "google_container_node_pool" "pools" {
}
}

{% if beta_cluster %}
dynamic "placement_policy" {
for_each = length(lookup(each.value, "placement_policy", "")) > 0 ? [each.value] : []
content {
type = lookup(placement_policy.value, "placement_policy", null)
}
}
{% endif %}

{% if beta_cluster %}
dynamic "network_config" {
for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : []
Expand Down
1 change: 1 addition & 0 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ resource "google_container_node_pool" "pools" {
}



management {
auto_repair = lookup(each.value, "auto_repair", true)
auto_upgrade = lookup(each.value, "auto_upgrade", local.default_auto_upgrade)
Expand Down
7 changes: 7 additions & 0 deletions modules/beta-private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,13 @@ resource "google_container_node_pool" "pools" {
}
}

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

dynamic "network_config" {
for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : []
content {
Expand Down
7 changes: 7 additions & 0 deletions modules/beta-private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,13 @@ resource "google_container_node_pool" "pools" {
}
}

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

dynamic "network_config" {
for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : []
content {
Expand Down
7 changes: 7 additions & 0 deletions modules/beta-public-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,13 @@ resource "google_container_node_pool" "pools" {
}
}

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

dynamic "network_config" {
for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : []
content {
Expand Down
7 changes: 7 additions & 0 deletions modules/beta-public-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,13 @@ resource "google_container_node_pool" "pools" {
}
}

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

dynamic "network_config" {
for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : []
content {
Expand Down
1 change: 1 addition & 0 deletions modules/private-cluster-update-variant/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ resource "google_container_node_pool" "pools" {
}



management {
auto_repair = lookup(each.value, "auto_repair", true)
auto_upgrade = lookup(each.value, "auto_upgrade", local.default_auto_upgrade)
Expand Down
1 change: 1 addition & 0 deletions modules/private-cluster/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ resource "google_container_node_pool" "pools" {
}



management {
auto_repair = lookup(each.value, "auto_repair", true)
auto_upgrade = lookup(each.value, "auto_upgrade", local.default_auto_upgrade)
Expand Down

0 comments on commit 122bcd0

Please sign in to comment.