mirror of
https://github.com/optim-enterprises-bv/terraform-talos.git
synced 2025-10-30 01:52:18 +00:00
scale down fixes
This commit is contained in:
@@ -19,9 +19,9 @@ resource "hcloud_floating_ip" "api" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resource "hcloud_floating_ip_assignment" "api" {
|
resource "hcloud_floating_ip_assignment" "api" {
|
||||||
count = local.lb_enable && length(local.controlplanes) > 0 ? 0 : 1
|
count = local.lb_enable ? 0 : (length(local.controlplanes) > 0 ? 1 : 0)
|
||||||
floating_ip_id = hcloud_floating_ip.api[0].id
|
floating_ip_id = hcloud_floating_ip.api[0].id
|
||||||
server_id = hcloud_server.controlplane[keys(local.controlplanes)[0]].id
|
server_id = length(local.controlplanes) > 0 ? hcloud_server.controlplane[keys(local.controlplanes)[0]].id : 0
|
||||||
|
|
||||||
lifecycle {
|
lifecycle {
|
||||||
ignore_changes = [
|
ignore_changes = [
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ variable "controlplane" {
|
|||||||
type = "cax21",
|
type = "cax21",
|
||||||
},
|
},
|
||||||
"fsn1" = {
|
"fsn1" = {
|
||||||
count = 1,
|
count = 0,
|
||||||
type = "cax21",
|
type = "cax21",
|
||||||
},
|
},
|
||||||
"hel1" = {
|
"hel1" = {
|
||||||
|
|||||||
Reference in New Issue
Block a user