Skip to content

Commit

Permalink
update by removing commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
marycrawford committed Jun 12, 2024
1 parent 1f68bf9 commit 031551c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 49 deletions.
10 changes: 6 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ module "ecs" {
ecr_repo_name = local.ecr_repo_name
ecs_app_task_family = local.ecs_app_task_family
target_group_name = local.target_group_name

ecs_s3_bucket_name = module.s3.ecs_s3_bucket_name
}

module "vpc" {
Expand All @@ -48,7 +50,7 @@ module "vpc" {
default_security_group_name = "${local.name}-security-group"
}

# module "eks-cluster" {
# source = "terraform-aws-modules/eks/aws"
# # subnets = flatten(module.eks-cluster.control_plane_subnet_ids, module.vpc.private_subnet_ids)
# }
module "s3" {
source = "./modules/s3"
ecs_assume_role_policy = module.ecs.ecr_viewer_and_s3_assume_role_policy
}
45 changes: 0 additions & 45 deletions modules/ecs/ecs-fhir-converter-service.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,48 +42,3 @@ resource "aws_ecs_service" "fhir_converter" {
# aws_alb_listener.listener_80, aws_alb_listener.listener_8080
depends_on = [aws_iam_role_policy_attachment.ecs_task_execution_role_policy_attachment]
}

# TODO: REFACTOR BY LOOPING THROUGH EACH SERVICE NAME
# resource "aws_ecs_task_definition" "ecs_service_task_definition" {
# for_each = var.ecr_repo_name
# family = "${each.value}-task"
# execution_role_arn = aws_iam_role.ecs_task_execution_role.arn
# network_mode = "awsvpc"
# requires_compatibilities = ["FARGATE"]
# cpu = var.fargate_cpu
# memory = var.fargate_memory
# container_definitions = "{data.template_file}.${each.value}_converter_app.rendered}"
# task_role_arn = aws_iam_role.ecs_task_execution_role.arn
# }

# resource "aws_ecs_service" "ecs_service" {
# # name = "fhir-converter"
# for_each = var.ecr_repo_name
# name = each.value
# cluster = aws_ecs_cluster.dibbs_app_cluster.id
# task_definition = aws_ecs_task_definition.ecs_service_task_definition.arn
# desired_count = var.app_count
# launch_type = "FARGATE"

# # 50 percent must be healthy during deploys
# deployment_minimum_healthy_percent = 50
# deployment_maximum_percent = 200

# deployment_circuit_breaker {
# enable = true
# rollback = true
# }

# deployment_controller {
# type = "ECS"
# }

# network_configuration {
# security_groups = ["${aws_security_group.service_security_group.id}"]
# subnets = var.public_subnet_ids
# assign_public_ip = true
# }

# # aws_alb_listener.listener_80, aws_alb_listener.listener_8080
# depends_on = [aws_alb_listener.listener_80, aws_alb_listener.listener_8080, aws_iam_role_policy_attachment.ecs-task-execution-role-policy-attachment]
# }

0 comments on commit 031551c

Please sign in to comment.