-
Notifications
You must be signed in to change notification settings - Fork 5
/
jaeger-agent.tf
39 lines (35 loc) · 951 Bytes
/
jaeger-agent.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
resource "aws_cloudwatch_log_group" "jaeger_agent" {
name = "jaeger-agent"
retention_in_days = 30
}
resource "aws_iam_role" "jaeger_agent" {
name = "jaeger-agent-role"
assume_role_policy = <<EOF
{
"Version": "2008-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "ecs-tasks.amazonaws.com"
},
"Effect": "Allow"
}
]
}
EOF
}
resource "aws_ecs_task_definition" "jaeger_agent" {
family = "jaeger-agent"
container_definitions = "${file("${path.module}/task-definitions/jaeger-agent.json")}"
task_role_arn = "${aws_iam_role.jaeger_agent.arn}"
}
resource "aws_ecs_service" "jaeger_agent" {
name = "jaeger-agent"
cluster = "${var.cluster_name}"
task_definition = "${aws_ecs_task_definition.jaeger_agent.arn}"
scheduling_strategy = "DAEMON"
lifecycle {
ignore_changes = ["task_definition"]
}
}