You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
615 B
23 lines
615 B
resource "aws_ecs_service" "my_api" { |
|
name = "my-api" |
|
task_definition = aws_ecs_task_definition.my_api.arn |
|
cluster = aws_ecs_cluster.my_cluster.id |
|
launch_type = "FARGATE" |
|
load_balancer { |
|
target_group_arn = aws_lb_target_group.my_api.arn |
|
container_name = "my-api" |
|
container_port = "3000" |
|
} |
|
desired_count = 1 |
|
network_configuration { |
|
assign_public_ip = false |
|
security_groups = [ |
|
aws_security_group.egress_all.id, |
|
aws_security_group.ingress_api.id, |
|
] |
|
subnets = [ |
|
aws_subnet.private_a.id, |
|
aws_subnet.private_b.id |
|
] |
|
} |
|
}
|
|
|