From 41668d50c247b934f065989f41d6121f8e1689b4 Mon Sep 17 00:00:00 2001 From: Malte Poll Date: Mon, 7 Nov 2022 23:04:50 +0100 Subject: [PATCH] Add recovery loadbalancer on AWS --- cli/internal/terraform/terraform/aws/main.tf | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/cli/internal/terraform/terraform/aws/main.tf b/cli/internal/terraform/terraform/aws/main.tf index edecfe705..0e3cc5ede 100644 --- a/cli/internal/terraform/terraform/aws/main.tf +++ b/cli/internal/terraform/terraform/aws/main.tf @@ -24,6 +24,7 @@ locals { ports_bootstrapper = "9000" ports_konnectivity = "8132" ports_verify = "30081" + ports_recovery = "9999" ports_debugd = "4000" tags = { constellation-uid = local.uid } @@ -112,6 +113,14 @@ resource "aws_security_group" "security_group" { description = "konnectivity" } + ingress { + from_port = local.ports_recovery + to_port = local.ports_recovery + protocol = "tcp" + cidr_blocks = ["0.0.0.0/0"] + description = "recovery" + } + ingress { from_port = 0 to_port = 0 @@ -169,6 +178,16 @@ module "load_balancer_target_verify" { healthcheck_protocol = "TCP" } +module "load_balancer_target_recovery" { + source = "./modules/load_balancer_target" + name = "${local.name}-recovery" + vpc_id = aws_vpc.vpc.id + lb_arn = aws_lb.front_end.arn + port = local.ports_recovery + tags = local.tags + healthcheck_protocol = "TCP" +} + module "load_balancer_target_debugd" { count = var.debug ? 1 : 0 // only deploy debugd in debug mode source = "./modules/load_balancer_target" @@ -204,6 +223,7 @@ module "instance_group_control_plane" { module.load_balancer_target_bootstrapper.target_group_arn, module.load_balancer_target_kubernetes.target_group_arn, module.load_balancer_target_verify.target_group_arn, + module.load_balancer_target_recovery.target_group_arn, module.load_balancer_target_konnectivity.target_group_arn, var.debug ? [module.load_balancer_target_debugd[0].target_group_arn] : [], ])