Skip to content

Commit

Permalink
scale down fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sergelogvinov committed Aug 15, 2024
1 parent d332100 commit a0fb5ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions hetzner/network-lb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion hetzner/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ variable "controlplane" {
type = "cax21",
},
"fsn1" = {
count = 1,
count = 0,
type = "cax21",
},
"hel1" = {
Expand Down

0 comments on commit a0fb5ac

Please sign in to comment.