Skip to content

Commit

Permalink
feat: update readwrite ECS service
Browse files Browse the repository at this point in the history
  • Loading branch information
JianLi-Expedia committed Oct 24, 2024
1 parent e5aa531 commit 8f23244
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@ resource "aws_ecs_task_definition" "apiary_hms_readonly" {
}

resource "aws_ecs_service" "apiary_hms_readwrite_service" {
count = var.hms_instance_type == "ecs" ? 1 : 0
depends_on = [aws_lb_target_group.apiary_hms_rw_tg]
name = "${local.instance_alias}-hms-readwrite-service"
launch_type = "FARGATE"
cluster = aws_ecs_cluster.apiary[0].id
task_definition = aws_ecs_task_definition.apiary_hms_readwrite[0].arn
desired_count = var.hms_rw_ecs_task_count
count = var.hms_instance_type == "ecs" ? 1 : 0
depends_on = [aws_lb_target_group.apiary_hms_rw_tg]
name = "${local.instance_alias}-hms-readwrite-service"
launch_type = "FARGATE"
platform_version = var.ecs_platform_version
cluster = aws_ecs_cluster.apiary[0].id
task_definition = aws_ecs_task_definition.apiary_hms_readwrite[0].arn
desired_count = var.hms_rw_ecs_task_count

load_balancer {
target_group_arn = aws_lb_target_group.apiary_hms_rw_tg[0].arn
Expand Down

0 comments on commit 8f23244

Please sign in to comment.