-
Notifications
You must be signed in to change notification settings - Fork 0
/
service.tf
46 lines (38 loc) · 979 Bytes
/
service.tf
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
resource "aws_ecs_cluster" "miami" {
name = "miami"
}
data "aws_ecs_task_definition" "miami" {
task_definition = "miami"
}
resource "aws_ecs_service" "miami" {
name = "miami"
cluster = aws_ecs_cluster.miami.id
task_definition = "${data.aws_ecs_task_definition.miami.family}:${data.aws_ecs_task_definition.miami.revision}"
desired_count = 1
launch_type = "FARGATE"
network_configuration {
subnets = [
"subnet-1bc7da7c"
]
assign_public_ip = true
}
load_balancer {
target_group_arn = aws_lb_target_group.telnet.arn
container_name = "miami"
container_port = 4000
}
load_balancer {
target_group_arn = aws_lb_target_group.http.arn
container_name = "miami"
container_port = 4001
}
load_balancer {
target_group_arn = aws_lb_target_group.ws.arn
container_name = "miami"
container_port = 4002
}
lifecycle {
ignore_changes = [
"task_definition"]
}
}