diff --git a/lb.tf b/lb.tf index beb784d..20403ef 100644 --- a/lb.tf +++ b/lb.tf @@ -1,5 +1,5 @@ module "lb" { - source = "git::https://github.com/appuio/terraform-modules.git//modules/vshn-lbaas-exoscale?ref=v4.1.0" + source = "git::https://github.com/appuio/terraform-modules.git//modules/vshn-lbaas-exoscale?ref=v4.2.0" exoscale_domain_name = exoscale_domain.cluster.name cluster_network = { @@ -21,8 +21,8 @@ module "lb" { enable_proxy_protocol = var.lb_enable_proxy_protocol additional_networks = var.additional_lb_networks - cluster_security_group_names = [ - exoscale_security_group.all_machines.name + cluster_security_group_ids = [ + exoscale_security_group.all_machines.id ] additional_affinity_group_ids = var.additional_affinity_group_ids diff --git a/security_groups.tf b/security_groups.tf index 8d57cc4..806cf1b 100644 --- a/security_groups.tf +++ b/security_groups.tf @@ -1,7 +1,3 @@ -data "exoscale_security_group" "lb" { - name = module.lb.security_group_name - depends_on = [module.lb] -} # https://docs.openshift.com/container-platform/4.7/installing/installing_bare_metal/installing-bare-metal.html#installation-network-user-infra_installing-bare-metal resource "exoscale_security_group" "all_machines" { name = "${var.cluster_id}_all_machines" @@ -117,7 +113,7 @@ resource "exoscale_security_group_rule" "control_plane_machine_config_server" { start_port = "22623" end_port = "22623" - user_security_group_id = data.exoscale_security_group.lb.id + user_security_group_id = module.lb.security_group_id } resource "exoscale_security_group_rule" "control_plane_kubernetes_api" { security_group_id = exoscale_security_group.control_plane.id @@ -149,7 +145,7 @@ resource "exoscale_security_group_rule" "infra" { start_port = each.value end_port = each.value - user_security_group_id = data.exoscale_security_group.lb.id + user_security_group_id = module.lb.security_group_id } resource "exoscale_security_group" "storage" {