-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.tf
79 lines (69 loc) · 1.48 KB
/
main.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
69
70
71
72
73
74
75
76
77
78
79
variable "region" {
default = "us-east-2"
}
provider "aws" {
region = var.region
version = "= 2.68"
}
module "container" {
source = "../.."
dd_tags = "env:staging"
# example dockerlabels
# https://docs.datadoghq.com/integrations/faq/integration-setup-ecs-fargate/?tab=rediswebui
docker_labels = {
"com.datadoghq.ad.instances" = jsonencode([
{
host = "%%host%%"
port = 8080
}
])
"com.datadoghq.ad.check_names" = jsonencode(
[
"supervisord"
]
)
"com.datadoghq.ad.init_configs" = jsonencode(
[{}]
)
}
container_name = "app"
container_image = "datadog/agent:latest"
container_memory = 256
container_memory_reservation = 128
container_cpu = 256
essential = true
readonly_root_filesystem = false
map_environment = {
string_var = "I am a string"
true_boolean_var = true
false_boolean_var = false
integer_var = 42
}
port_mappings = [
{
containerPort = 8080
hostPort = 80
protocol = "tcp"
},
{
containerPort = 8081
hostPort = 443
protocol = "udp"
}
]
log_configuration = {
logDriver = "json-file"
options = {
"max-size" = "10m"
"max-file" = "3"
}
secretOptions = null
}
privileged = false
extra_hosts = [
{
ipAddress = "127.0.0.1"
hostname = "app.local"
},
]
}