Skip to content

Commit

Permalink
Merge pull request #54 from appuio/fix/floating-ip-no-lbs
Browse files Browse the repository at this point in the history
Fix vip index errors for clusters with no LBs
  • Loading branch information
haasad authored May 16, 2024
2 parents b49bcf9 + ac7d1e8 commit 0a05a36
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions modules/vshn-lbaas-cloudscale/hiera.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ module "hiera" {
ingress_controller = var.ingress_controller
lb_names = random_id.lb[*].hex
hieradata_repo_user = var.hieradata_repo_user
api_vip = cidrhost(local.api_vip.network, 0)
api_vip = cidrhost(local.api_vip[0].network, 0)
internal_vip = var.internal_vip
nat_vip = cidrhost(local.nat_vip.network, 0)
router_vip = cidrhost(local.router_vip.network, 0)
nat_vip = cidrhost(local.nat_vip[0].network, 0)
router_vip = cidrhost(local.router_vip[0].network, 0)
team = var.team
enable_proxy_protocol = var.enable_proxy_protocol

Expand Down
6 changes: 3 additions & 3 deletions modules/vshn-lbaas-cloudscale/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ resource "cloudscale_server_group" "lb" {
}

locals {
api_vip = var.use_existing_vips ? data.cloudscale_floating_ip.api_vip[0] : cloudscale_floating_ip.api_vip[0]
router_vip = var.use_existing_vips ? data.cloudscale_floating_ip.router_vip[0] : cloudscale_floating_ip.router_vip[0]
nat_vip = var.use_existing_vips ? data.cloudscale_floating_ip.nat_vip[0] : cloudscale_floating_ip.nat_vip[0]
api_vip = var.use_existing_vips ? data.cloudscale_floating_ip.api_vip : cloudscale_floating_ip.api_vip
router_vip = var.use_existing_vips ? data.cloudscale_floating_ip.router_vip : cloudscale_floating_ip.router_vip
nat_vip = var.use_existing_vips ? data.cloudscale_floating_ip.nat_vip : cloudscale_floating_ip.nat_vip

instance_fqdns = formatlist("%s.${var.node_name_suffix}", random_id.lb[*].hex)

Expand Down

0 comments on commit 0a05a36

Please sign in to comment.