-
Notifications
You must be signed in to change notification settings - Fork 7
/
dd-agent.tf
68 lines (63 loc) · 1.42 KB
/
dd-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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
module "datadog_sidecar" {
source = "cloudposse/ecs-container-definition/aws"
version = "v0.58.1"
container_name = "datadog-agent"
container_image = var.datadog_agent_container_image
essential = var.datadog_agent_container_essential
port_mappings = [
{
"protocol" : "tcp",
"containerPort" : 8125,
"hostPort" : 8125
},
{
"protocol" : "tcp",
"containerPort" : 8126,
"hostPort" : 8126
}
]
environment = [
{
name = "ECS_FARGATE"
value = true
},
{
name = "DD_APM_ENABLED",
value = true
},
{
name = "DD_APM_NON_LOCAL_TRAFFIC",
value = true
},
{
name = "DD_APM_RECEIVER_PORT",
value = 8126
},
{
name = "DD_DOGSTATSD_NON_LOCAL_TRAFFIC",
value = true
},
{
name = "DD_DOGSTATSD_PORT",
value = 8125
},
{
name = "DD_CONTAINER_EXCLUDE",
value = "name:datadog-agent name:log_router"
},
{
name = "DD_TAGS"
value = replace(var.datadog_tags, ",", " ")
},
{
name = "DD_PROCESS_AGENT_PROCESS_COLLECTION_ENABLED"
value = tostring(var.datadog_process_collection_enabled)
}
]
secrets = [
{
name = "DD_API_KEY"
valueFrom = "arn:aws:ssm:${data.aws_region.current.name}:${data.aws_caller_identity.current.account_id}:parameter/${var.environment}/shared/datadog/api_key"
},
]
}