Skip to content

Commit

Permalink
test slice function
Browse files Browse the repository at this point in the history
  • Loading branch information
maxi418 committed Nov 30, 2023
1 parent b89702d commit 681f400
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/ionos-k8s-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ resource "ionoscloud_k8s_node_pool" "nodepool_scaling" {
cores_count = each.value.core_count
ram_size = each.value.ram_size
storage_size = each.value.storage_size
public_ips = each.value.create_public_ip_pools == true ? ionoscloud_ipblock.ippools[each.key].ips : (each.value.max_node_count > length(each.value.public_ips) ? [] : slice(each.value.public_ips[each.value.nodepool_index], 0, each.value.max_node_count+1))
public_ips = each.value.create_public_ip_pools == true ? ionoscloud_ipblock.ippools[each.key].ips : (each.value.max_node_count > length(each.value.public_ips) ? [] : slice(each.value.public_ips[each.value.nodepool_index], 0, each.value.max_node_count))

auto_scaling {
min_node_count = each.value.min_node_count
Expand Down Expand Up @@ -113,7 +113,7 @@ resource "ionoscloud_k8s_node_pool" "nodepool_legacy" {
cores_count = each.value.core_count
ram_size = each.value.ram_size
storage_size = each.value.storage_size
public_ips = each.value.create_public_ip_pools ? ionoscloud_ipblock.ippools[each.key].ips : each.value.public_ips == null ? [] : each.value.node_count > length(each.value.public_ips) ? [] : slice(each.value.public_ips[each.value.nodepool_index], 0, each.value.node_count+1) #slice(public_ips[0] = [""],0,2)
public_ips = each.value.create_public_ip_pools ? ionoscloud_ipblock.ippools[each.key].ips : each.value.public_ips == null ? [] : each.value.node_count > length(each.value.public_ips) ? [] : slice(each.value.public_ips[each.value.nodepool_index], 0, each.value.node_count) #slice(public_ips[0] = [""],0,2)
}

resource "ionoscloud_ipblock" "ippools" {
Expand Down

0 comments on commit 681f400

Please sign in to comment.