-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecs.tf
51 lines (45 loc) · 1.14 KB
/
ecs.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
47
48
49
50
51
resource "aws_ecs_cluster" "ecs_deployer_test" {
name = "ecs_deployer_test"
tags = {
Application = "ecs_deployer_test"
Name = "ecs_deployer_test"
ECS_Deployer = true
}
}
resource "aws_ecs_service" "ecs_deployer_test" {
name = "ecs_deployer_test"
cluster = aws_ecs_cluster.ecs_deployer_test.id
task_definition = aws_ecs_task_definition.ecs_deployer_test.arn
desired_count = var.service_count
tags = {
Application = "ecs_deployer_test"
Name = "ecs_deployer_test"
ECS_Deployer = false
}
}
resource "aws_ecs_task_definition" "ecs_deployer_test" {
container_definitions = jsonencode([
{
name = "test"
image = "docker.io/falmar/hostname"
essential = true
cpu = 256
memory = 512
portMappings = [
{
containerPort = 3000
hostPort = 3000
protocol = "tcp"
}
]
}
])
family = "ecs_deployer_test"
cpu = "256"
memory = "512"
tags = {
Application = "ecs_deployer_test"
Name = "ecs_deployer_test"
ECS_Deployer = true
}
}