Skip to content

Commit b67c80b

Browse files
authored
Merge pull request #81 from appuio/use-existing-floating-ips
Add optional support for using existing floating IPs
2 parents 3332396 + 2f802b8 commit b67c80b

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

lb.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module "lb" {
2-
source = "git::https://github.com/appuio/terraform-modules.git//modules/vshn-lbaas-cloudscale?ref=v5.1.0"
2+
source = "git::https://github.com/appuio/terraform-modules.git//modules/vshn-lbaas-cloudscale?ref=v6.1.0"
33

44
node_name_suffix = local.node_name_suffix
55
cluster_id = var.cluster_id
@@ -11,6 +11,7 @@ module "lb" {
1111
control_vshn_net_token = var.control_vshn_net_token
1212
team = var.team
1313
additional_networks = var.additional_lb_networks
14+
use_existing_vips = var.use_existing_vips
1415

1516
router_backends = module.infra.ip_addresses[*]
1617
bootstrap_node = var.bootstrap_count > 0 ? cidrhost(var.privnet_cidr, 10) : ""

outputs.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
output "dns_entries" {
22
value = templatefile("${path.module}/templates/dns.zone", {
33
"node_name_suffix" = local.node_name_suffix,
4-
"api_vip" = var.lb_count != 0 ? split("/", module.lb.api_vip[0].network)[0] : ""
5-
"router_vip" = var.lb_count != 0 ? split("/", module.lb.router_vip[0].network)[0] : ""
6-
"egress_vip" = var.lb_count != 0 ? split("/", module.lb.nat_vip[0].network)[0] : ""
4+
"api_vip" = var.lb_count != 0 ? split("/", module.lb.api_vip.network)[0] : ""
5+
"router_vip" = var.lb_count != 0 ? split("/", module.lb.router_vip.network)[0] : ""
6+
"egress_vip" = var.lb_count != 0 ? split("/", module.lb.nat_vip.network)[0] : ""
77
"internal_vip" = cidrhost(local.privnet_cidr, 100),
88
"masters" = module.master.ip_addresses,
99
"cluster_id" = var.cluster_id,

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,9 @@ variable "lb_enable_proxy_protocol" {
169169
description = "Enable the PROXY protocol on the loadbalancers. WARNING: Connections will fail until you enable the same on the OpenShift router as well"
170170
default = false
171171
}
172+
173+
variable "use_existing_vips" {
174+
type = bool
175+
description = "Use existing floating IPs for api_vip, router_vip and nat_vip. Manually set the reverse DNS info, so the correct data source is found."
176+
default = false
177+
}

0 commit comments

Comments
 (0)