From bfb927464fa02bde02e0457895a411ebb7163c00 Mon Sep 17 00:00:00 2001 From: George Taylor Date: Fri, 8 Mar 2024 16:45:33 +0000 Subject: [PATCH] remove community api (#5281) --- .../delius-core/locals_development.tf | 5 - .../environments/delius-core/locals_test.tf | 5 - .../delius_environment/community_api.tf | 113 ------------------ 3 files changed, 123 deletions(-) delete mode 100644 terraform/environments/delius-core/modules/delius_environment/community_api.tf diff --git a/terraform/environments/delius-core/locals_development.tf b/terraform/environments/delius-core/locals_development.tf index fb06134fd69..b1e895c8501 100644 --- a/terraform/environments/delius-core/locals_development.tf +++ b/terraform/environments/delius-core/locals_development.tf @@ -126,11 +126,6 @@ locals { container_port = 8080 } - community_api = { - image_tag = "REPLACE" - container_port = 8080 - } - pdf_creation = { image_tag = "5.7.6" container_port = 80 diff --git a/terraform/environments/delius-core/locals_test.tf b/terraform/environments/delius-core/locals_test.tf index 49405d15f25..c4ffab50b5b 100644 --- a/terraform/environments/delius-core/locals_test.tf +++ b/terraform/environments/delius-core/locals_test.tf @@ -134,11 +134,6 @@ locals { container_port = 8080 } - community_api = { - image_tag = "REPLACE" - container_port = 8080 - } - pdf_creation = { image_tag = "5.7.6" container_port = 80 diff --git a/terraform/environments/delius-core/modules/delius_environment/community_api.tf b/terraform/environments/delius-core/modules/delius_environment/community_api.tf deleted file mode 100644 index c5dcc7355e6..00000000000 --- a/terraform/environments/delius-core/modules/delius_environment/community_api.tf +++ /dev/null @@ -1,113 +0,0 @@ -module "community_api" { - source = "../helpers/delius_microservice" - - name = "community-api" - certificate_arn = aws_acm_certificate.external.arn - alb_security_group_id = aws_security_group.delius_frontend_alb_security_group.id - env_name = var.env_name - container_port_config = [ - { - containerPort = var.delius_microservice_configs.community_api.container_port - protocol = "tcp" - } - ] - ecs_cluster_arn = module.ecs.ecs_cluster_arn - container_secrets = [ - # { - # name = "APPINSIGHTS_INSTRUMENTATIONKEY" - # valueFrom = "/${var.environment_name}/${var.project_name}/newtech/offenderapi/appinsights_key" - # }, - { - name = "SPRING_DATASOURCE_PASSWORD" - valueFrom = aws_ssm_parameter.jdbc_password.arn - # valueFrom = "/${var.environment_name}/${var.project_name}/delius-database/db/delius_pool_password" - } - # , - # { - # name = "SPRING_LDAP_PASSWORD" - # valueFrom = "/${var.environment_name}/${var.project_name}/apacheds/apacheds/ldap_admin_password" - # }, - # { - # name = "DELIUS_USERNAME" - # valueFrom = "/${var.environment_name}/${var.project_name}/apacheds/apacheds/casenotes_user" - # }, - # { - # name = "DELIUS_PASSWORD" - # valueFrom = "/${var.environment_name}/${var.project_name}/apacheds/apacheds/casenotes_password" - # }, - # { - # name = "SENTRY_DSN" - # valueFrom = "/${var.environment_name}/${var.project_name}/probation-integration/community-api/sentry-dsn" - # } - ] - db_ingress_security_groups = [] - cluster_security_group_id = aws_security_group.cluster.id - - bastion_sg_id = module.bastion_linux.bastion_security_group - tags = var.tags - # TODO - This LB is a placeholder marked no 13 on the architecture diagram: https://dsdmoj.atlassian.net/wiki/spaces/DAM/pages/3773105057/High-Level+Architecture - # Two LBs (public and secure) are needed as show on the architecture diagram. There is an architectural discussion to be had if we could get away with just one LB instead - microservice_lb = aws_lb.delius_core_frontend - microservice_lb_https_listener_arn = aws_lb_listener.listener_https.arn - - # Please check with the app team what the rule path should be here. - alb_listener_rule_paths = ["/secure", "/secure/*"] - 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-community-api-ecr-repo:${var.delius_microservice_configs.community_api.image_tag}" - account_config = var.account_config - health_check_path = "/health/ping" - account_info = var.account_info - container_environment_vars = [ - { - name = "SPRING_PROFILES_ACTIVE" - # The value below is from the legacy - value = "oracle" - }, - { - name = "SPRING_DATASOURCE_USERNAME" - # The value below is from the legacy - value = "delius_pool" - }, - { - name = "SPRING_DATASOURCE_URL" - value = aws_ssm_parameter.jdbc_url.arn - # The value below is from the legacy - # value = data.terraform_remote_state.database.outputs.jdbc_failover_url - }, - { - name = "DELIUS_LDAP_USERS_BASE" - value = module.ldap.delius_core_ldap_principal_arn - # The value below is from the legacy - # value = data.terraform_remote_state.ldap.outputs.ldap_base_users - }, - { - name = "SPRING_LDAP_USERNAME" - value = module.ldap.delius_core_ldap_principal_arn - # The value below is from the legacy - # value = data.terraform_remote_state.ldap.outputs.ldap_bind_user - }, - { - name = "SPRING_LDAP_URLS" - value = "ldap://${module.ldap.nlb_dns_name}:${var.ldap_config.port}" - # The value below is from the legacy - # value = "${data.terraform_remote_state.ldap.outputs.ldap_protocol}://${data.terraform_remote_state.ldap.outputs.private_fqdn_ldap_elb}:${data.terraform_remote_state.ldap.outputs.ldap_port}" - }, - # { - # name = "ALFRESCO_BASEURL" - # value = "https://alfresco.${data.terraform_remote_state.vpc.outputs.public_zone_name}/alfresco/s/noms-spg" - # }, - # { - # name = "DELIUS_BASEURL" - # value = "http://${data.terraform_remote_state.interface.outputs.service_discovery_url}:7001/api" - # }, - { - name = "SENTRY_ENVIRONMENT" - value = var.env_name - } - ] - - providers = { - aws = aws - aws.core-vpc = aws.core-vpc - } -}