-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathecs_service.tf
More file actions
25 lines (25 loc) · 825 Bytes
/
ecs_service.tf
File metadata and controls
25 lines (25 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
resource "aws_ecs_service" "rpc_node_service" {
name = "rpc-${var.environment}-service"
cluster = module.ecs.ecs_cluster_id
task_definition = aws_ecs_task_definition.primelab_nodes.arn
enable_execute_command = true
desired_count = 1
launch_type = "FARGATE"
load_balancer {
target_group_arn = aws_lb_target_group.primelab_tg_3030.arn
container_name = var.container_name
container_port = 3030
}
load_balancer {
target_group_arn = aws_lb_target_group.primelab_tg_24567.arn
container_name = var.container_name
container_port = 24567
}
network_configuration {
subnets = module.near_vpc.private_subnets
assign_public_ip = false
security_groups = [
aws_security_group.ecs_node.id
]
}
}