forked from nicgrayson/terraform-provider-marathon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.tf
94 lines (84 loc) · 1.63 KB
/
example.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
resource "marathon_app" "app-create-example" {
app_id = "/app-create-example"
cmd = "env && python3 -m http.server 8080"
constraints {
constraint {
attribute = "hostname"
operation = "UNIQUE"
}
constraint {
attribute = "hostname"
operation = "UNIQUE"
parameter = "test"
}
}
container {
docker {
image = "python:3"
network = "BRIDGE"
parameters {
parameter {
key = "hostname"
value = "a.corp.org"
}
}
port_mappings {
port_mapping {
container_port = 8080
host_port = 0
protocol = "tcp"
}
port_mapping {
container_port = 161
host_port = 0
protocol = "udp"
}
}
}
volumes {
volume {
container_path = "/etc/a"
host_path = "/var/data/a"
mode = "RO"
}
volume {
container_path = "/etc/b"
host_path = "/var/data/b"
mode = "RW"
}
}
}
cpus = "0.01"
env {
TEST = "hey"
OTHER_TEST = "nope"
}
health_checks {
health_check {
grace_period_seconds = 3
interval_seconds = 10
max_consecutive_failures = 0
path = "/"
port_index = 0
protocol = "HTTP"
timeout_seconds = 5
}
health_check {
command {
value = "curl -f -X GET http://$HOST:$PORT0/"
}
max_consecutive_failures = 0
protocol = "COMMAND"
}
}
instances = 1
labels {
test = "abc"
}
mem = 50
ports = [0, 0]
upgrade_strategy {
minimum_health_capacity = "0.5"
}
# dependencies = ["/test"]
}