-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathoreno_tf_ecs_ecs.tf.disabled
48 lines (42 loc) · 1.2 KB
/
oreno_tf_ecs_ecs.tf.disabled
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
#
# Create ECS cluster
#
resource "aws_ecs_cluster" "kappa-cluster" {
name = "kappa-cluster"
}
#
# Define task
#
resource "aws_ecs_task_definition" "sample_app1" {
family = "sample_app1"
container_definitions = "${file("task-definitions/foo.json")}"
}
resource "aws_ecs_task_definition" "sample_app2" {
family = "sample_app2"
container_definitions = "${file("task-definitions/bar.json")}"
}
resource "aws_ecs_task_definition" "docker_registry" {
family = "docker_registry"
container_definitions = "${file("task-definitions/registry.json")}"
}
#
# Define Service(as container start)
#
resource "aws_ecs_service" "kappa-sample1" {
name = "kappa-sample1"
cluster = "${aws_ecs_cluster.kappa-cluster.id}"
task_definition = "${aws_ecs_task_definition.sample_app1.arn}"
desired_count = 0
}
resource "aws_ecs_service" "kappa-sample2" {
name = "kappa-sample2"
cluster = "${aws_ecs_cluster.kappa-cluster.id}"
task_definition = "${aws_ecs_task_definition.sample_app2.arn}"
desired_count = 0
}
resource "aws_ecs_service" "kappa-registry" {
name = "kappa-registry"
cluster = "${aws_ecs_cluster.kappa-cluster.id}"
task_definition = "${aws_ecs_task_definition.docker_registry.arn}"
desired_count = 1
}