scale down fixes

This commit is contained in:
Serge Logvinov
2024-08-15 17:24:28 +03:00
parent d33210018b
commit a0fb5ac4fd
2 changed files with 3 additions and 3 deletions

View File

@@ -19,9 +19,9 @@ resource "hcloud_floating_ip" "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
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 {
ignore_changes = [

View File

@@ -69,7 +69,7 @@ variable "controlplane" {
type = "cax21",
},
"fsn1" = {
count = 1,
count = 0,
type = "cax21",
},
"hel1" = {