From c6d3d3667059d4ecd6b36b1b6a7878b90fb0b712 Mon Sep 17 00:00:00 2001 From: George Taylor Date: Fri, 9 Feb 2024 18:37:45 +0000 Subject: [PATCH] remove --- .../community_api.tf | 3 -- .../environment_all_components/ecs_connect.tf | 52 ------------------- .../gdpr_api_service.tf | 3 -- .../gdpr_ui_service.tf | 3 -- .../merge_api_service.tf | 3 -- .../merge_ui_service.tf | 3 -- .../password_reset_service.tf | 3 -- .../user_management.tf | 3 -- .../environment_all_components/weblogic.tf | 3 -- .../weblogic_eis.tf | 3 -- 10 files changed, 79 deletions(-) delete mode 100644 terraform/environments/delius-core/modules/environment_all_components/ecs_connect.tf diff --git a/terraform/environments/delius-core/modules/environment_all_components/community_api.tf b/terraform/environments/delius-core/modules/environment_all_components/community_api.tf index 8a4c6c3e9e8..0ce0f96bf0b 100644 --- a/terraform/environments/delius-core/modules/environment_all_components/community_api.tf +++ b/terraform/environments/delius-core/modules/environment_all_components/community_api.tf @@ -47,9 +47,6 @@ module "community_api" { microservice_lb_arn = aws_lb.delius_core_frontend.arn microservice_lb_https_listener_arn = aws_lb_listener.listener_https.arn - ecs_connectivity_services_alb = aws_lb.delius_microservices - ecs_connectivity_services_alb_listeners = aws_lb_listener.delius_microservices_listeners - # Please check with the app team what the rule path should be here. alb_listener_rule_paths = ["/secure", "/secure/*"] platform_vars = var.platform_vars diff --git a/terraform/environments/delius-core/modules/environment_all_components/ecs_connect.tf b/terraform/environments/delius-core/modules/environment_all_components/ecs_connect.tf deleted file mode 100644 index 42fa35f0288..00000000000 --- a/terraform/environments/delius-core/modules/environment_all_components/ecs_connect.tf +++ /dev/null @@ -1,52 +0,0 @@ -resource "aws_lb" "delius_microservices" { - name = "delius-microservices" - internal = true - load_balancer_type = "application" - security_groups = [aws_security_group.delius_microservices_service_alb.id] - subnets = var.account_config.private_subnet_ids - enable_deletion_protection = false - tags = merge({ - Name = "delius-microservices-services-alb" - }, var.tags) -} - -resource "aws_security_group" "delius_microservices_service_alb" { - name = "delius-microservices-alb" - description = "Security group for delius microservices service load balancer" - vpc_id = var.account_info.vpc_id - tags = merge({ - Name = "delius-microservices-services-alb" - }, var.tags) - lifecycle { - create_before_destroy = true - } -} - -resource "aws_vpc_security_group_ingress_rule" "from_bastion" { - referenced_security_group_id = module.bastion_linux.bastion_security_group - ip_protocol = "-1" - security_group_id = aws_security_group.delius_microservices_service_alb.id -} - -locals { - unique_container_ports = distinct([for _, v in var.delius_microservice_configs : v.container_port]) -} - -resource "aws_lb_listener" "delius_microservices_listeners" { - for_each = { - for port in local.unique_container_ports : port => var.delius_microservice_configs - } - - load_balancer_arn = aws_lb.delius_microservices.arn - port = each.key - protocol = "TCP" - - default_action { - type = "fixed-response" - fixed_response { - content_type = "text/plain" - message_body = "Delius microservices listener" - status_code = "200" - } - } -} \ No newline at end of file diff --git a/terraform/environments/delius-core/modules/environment_all_components/gdpr_api_service.tf b/terraform/environments/delius-core/modules/environment_all_components/gdpr_api_service.tf index f300a4d4619..f08b1d13b10 100644 --- a/terraform/environments/delius-core/modules/environment_all_components/gdpr_api_service.tf +++ b/terraform/environments/delius-core/modules/environment_all_components/gdpr_api_service.tf @@ -33,9 +33,6 @@ module "gdpr_api_service" { microservice_lb_arn = aws_lb.delius_core_frontend.arn microservice_lb_https_listener_arn = aws_lb_listener.listener_https.arn - ecs_connectivity_services_alb = aws_lb.delius_microservices - ecs_connectivity_services_alb_listeners = aws_lb_listener.delius_microservices_listeners - alb_listener_rule_paths = ["/gdpr/api", "/gdpr/api/*"] platform_vars = var.platform_vars container_image = "${var.platform_vars.environment_management.account_ids["core-shared-services-production"]}.dkr.ecr.eu-west-2.amazonaws.com/delius-core-gdpr-api-ecr-repo:${var.delius_microservice_configs.gdpr_api.image_tag}" diff --git a/terraform/environments/delius-core/modules/environment_all_components/gdpr_ui_service.tf b/terraform/environments/delius-core/modules/environment_all_components/gdpr_ui_service.tf index 945165e5ca3..2fab6fdd2ab 100644 --- a/terraform/environments/delius-core/modules/environment_all_components/gdpr_ui_service.tf +++ b/terraform/environments/delius-core/modules/environment_all_components/gdpr_ui_service.tf @@ -18,9 +18,6 @@ module "gdpr_ui_service" { microservice_lb_arn = aws_lb.delius_core_frontend.arn microservice_lb_https_listener_arn = aws_lb_listener.listener_https.arn - ecs_connectivity_services_alb = aws_lb.delius_microservices - ecs_connectivity_services_alb_listeners = aws_lb_listener.delius_microservices_listeners - alb_listener_rule_paths = ["/gdpr/ui", "/gdpr/ui/*"] platform_vars = var.platform_vars container_image = "${var.platform_vars.environment_management.account_ids["core-shared-services-production"]}.dkr.ecr.eu-west-2.amazonaws.com/delius-core-gdpr-ui-ecr-repo:${var.delius_microservice_configs.gdpr_ui.image_tag}" diff --git a/terraform/environments/delius-core/modules/environment_all_components/merge_api_service.tf b/terraform/environments/delius-core/modules/environment_all_components/merge_api_service.tf index 58d426a97b6..2027a991dc7 100644 --- a/terraform/environments/delius-core/modules/environment_all_components/merge_api_service.tf +++ b/terraform/environments/delius-core/modules/environment_all_components/merge_api_service.tf @@ -31,9 +31,6 @@ module "merge_api_service" { microservice_lb_arn = aws_lb.delius_core_frontend.arn microservice_lb_https_listener_arn = aws_lb_listener.listener_https.arn - ecs_connectivity_services_alb = aws_lb.delius_microservices - ecs_connectivity_services_alb_listeners = aws_lb_listener.delius_microservices_listeners - alb_listener_rule_paths = ["/merge/api", "/merge/api/*"] platform_vars = var.platform_vars container_image = "${var.platform_vars.environment_management.account_ids["core-shared-services-production"]}.dkr.ecr.eu-west-2.amazonaws.com/delius-core-merge-api-ecr-repo:${var.delius_microservice_configs.merge_api.image_tag}" diff --git a/terraform/environments/delius-core/modules/environment_all_components/merge_ui_service.tf b/terraform/environments/delius-core/modules/environment_all_components/merge_ui_service.tf index ef543be0488..49710b36884 100644 --- a/terraform/environments/delius-core/modules/environment_all_components/merge_ui_service.tf +++ b/terraform/environments/delius-core/modules/environment_all_components/merge_ui_service.tf @@ -18,9 +18,6 @@ module "merge_ui_service" { microservice_lb_arn = aws_lb.delius_core_frontend.arn microservice_lb_https_listener_arn = aws_lb_listener.listener_https.arn - ecs_connectivity_services_alb = aws_lb.delius_microservices - ecs_connectivity_services_alb_listeners = aws_lb_listener.delius_microservices_listeners - alb_listener_rule_paths = ["/merge/ui", "/merge/ui/*"] platform_vars = var.platform_vars container_image = "${var.platform_vars.environment_management.account_ids["core-shared-services-production"]}.dkr.ecr.eu-west-2.amazonaws.com/delius-core-merge-ui-ecr-repo:${var.delius_microservice_configs.merge_ui.image_tag}" diff --git a/terraform/environments/delius-core/modules/environment_all_components/password_reset_service.tf b/terraform/environments/delius-core/modules/environment_all_components/password_reset_service.tf index 44c253b609b..c8a43d932fc 100644 --- a/terraform/environments/delius-core/modules/environment_all_components/password_reset_service.tf +++ b/terraform/environments/delius-core/modules/environment_all_components/password_reset_service.tf @@ -35,9 +35,6 @@ module "password_reset_service" { microservice_lb_arn = aws_lb.delius_core_frontend.arn microservice_lb_https_listener_arn = aws_lb_listener.listener_https.arn - ecs_connectivity_services_alb = aws_lb.delius_microservices - ecs_connectivity_services_alb_listeners = aws_lb_listener.delius_microservices_listeners - #TODO - check the path based routing based on shared ALB or dedicated alb_listener_rule_paths = ["/password-reset"] platform_vars = var.platform_vars diff --git a/terraform/environments/delius-core/modules/environment_all_components/user_management.tf b/terraform/environments/delius-core/modules/environment_all_components/user_management.tf index e903f249e9c..525086f303d 100644 --- a/terraform/environments/delius-core/modules/environment_all_components/user_management.tf +++ b/terraform/environments/delius-core/modules/environment_all_components/user_management.tf @@ -32,9 +32,6 @@ module "user_management" { microservice_lb_https_listener_arn = aws_lb_listener.listener_https.arn alb_listener_rule_paths = ["/umt"] - ecs_connectivity_services_alb = aws_lb.delius_microservices - ecs_connectivity_services_alb_listeners = aws_lb_listener.delius_microservices_listeners - container_image = "${var.platform_vars.environment_management.account_ids["core-shared-services-production"]}.dkr.ecr.eu-west-2.amazonaws.com/delius-core-user-management-ecr-repo:${var.delius_microservice_configs.user_management.image_tag}" platform_vars = var.platform_vars diff --git a/terraform/environments/delius-core/modules/environment_all_components/weblogic.tf b/terraform/environments/delius-core/modules/environment_all_components/weblogic.tf index 1ab15903330..d2b9571f610 100644 --- a/terraform/environments/delius-core/modules/environment_all_components/weblogic.tf +++ b/terraform/environments/delius-core/modules/environment_all_components/weblogic.tf @@ -50,9 +50,6 @@ module "weblogic" { health_check_path = "/NDelius-war/delius/JSP/healthcheck.jsp?ping" microservice_lb_arn = aws_lb.delius_core_frontend.arn - ecs_connectivity_services_alb = aws_lb.delius_microservices - ecs_connectivity_services_alb_listeners = aws_lb_listener.delius_microservices_listeners - name = "weblogic" container_image = "${var.platform_vars.environment_management.account_ids["core-shared-services-production"]}.dkr.ecr.eu-west-2.amazonaws.com/delius-core-weblogic-ecr-repo:${var.delius_microservice_configs.weblogic.image_tag}" platform_vars = var.platform_vars diff --git a/terraform/environments/delius-core/modules/environment_all_components/weblogic_eis.tf b/terraform/environments/delius-core/modules/environment_all_components/weblogic_eis.tf index ef03bf3a662..4ee02643fd5 100644 --- a/terraform/environments/delius-core/modules/environment_all_components/weblogic_eis.tf +++ b/terraform/environments/delius-core/modules/environment_all_components/weblogic_eis.tf @@ -189,9 +189,6 @@ module "weblogic_eis" { microservice_lb_https_listener_arn = aws_lb_listener.listener_https.arn alb_listener_rule_paths = ["/eis"] - ecs_connectivity_services_alb = aws_lb.delius_microservices - ecs_connectivity_services_alb_listeners = aws_lb_listener.delius_microservices_listeners - container_image = "${var.platform_vars.environment_management.account_ids["core-shared-services-production"]}.dkr.ecr.eu-west-2.amazonaws.com/delius-core-weblogic-eis-ecr-repo:${var.delius_microservice_configs.weblogic_eis.image_tag}" platform_vars = var.platform_vars