-
Notifications
You must be signed in to change notification settings - Fork 7
/
variables.tf
225 lines (187 loc) · 6.41 KB
/
variables.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
variable "env" {
description = "Environment name"
}
variable "platform_config" {
description = "Platform configuration"
type = "map"
default = {}
}
variable "release" {
type = "map"
description = "Metadata about the release"
}
variable "secrets" {
type = "map"
description = "Secret credentials fetched using credstash"
default = {}
}
variable "common_application_environment" {
description = "Environment parameters passed to the container for all environments"
type = "map"
default = {}
}
variable "application_environment" {
description = "Environment specific parameters passed to the container"
type = "map"
default = {}
}
variable "ecs_cluster" {
type = "string"
description = "The ECS cluster"
default = "default"
}
variable "port" {
type = "string"
description = "The port that container will be running on"
}
variable "cpu" {
type = "string"
description = "CPU unit reservation for the container"
}
variable "memory" {
type = "string"
description = "The memory reservation for the container in megabytes"
}
variable "nofile_soft_ulimit" {
type = "string"
description = "The soft ulimit for the number of files in container"
default = "4096"
}
variable "desired_count" {
description = "The number of instances of the task definition to place and keep running."
type = "string"
default = "3"
}
variable "name_suffix" {
description = "Set a suffix that will be applied to the name in order that a component can have multiple services per environment"
type = "string"
default = ""
}
variable "target_group_arn" {
description = "The ALB target group for the service."
type = "string"
}
variable "logentries_token" {
description = "The Logentries token used to be able to get logs sent to a specific log set."
type = "string"
default = ""
}
variable "task_role_policy" {
description = "IAM policy document to apply to the tasks via a task role"
type = "string"
default = <<END
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:GetCallerIdentity",
"Effect": "Allow",
"Resource": "*"
}
]
}
END
}
variable "assume_role_policy" {
description = "A valid IAM policy for assuming roles - optional"
type = "string"
default = ""
}
variable "taskdef_volume" {
description = "Map containing 'name' and 'host_path' used to add a volume mapping to the taskdef."
type = "map"
default = {}
}
variable "container_mountpoint" {
description = "Map containing 'sourceVolume', 'containerPath' and 'readOnly' (optional) to map a volume into a container."
type = "map"
default = {}
}
variable "container_port_mappings" {
description = "JSON document containing an array of port mappings for the container defintion - if set port is ignored (optional)."
default = ""
type = "string"
}
variable "container_labels" {
description = "Additional docker labels to apply to the container."
type = "map"
default = {}
}
variable "deployment_minimum_healthy_percent" {
description = "The minimumHealthyPercent represents a lower limit on the number of your service's tasks that must remain in the RUNNING state during a deployment, as a percentage of the desiredCount (rounded up to the nearest integer)."
default = "100"
}
variable "deployment_maximum_percent" {
description = "The maximumPercent parameter represents an upper limit on the number of your service's tasks that are allowed in the RUNNING or PENDING state during a deployment, as a percentage of the desiredCount (rounded down to the nearest integer)."
default = "200"
}
variable "log_subscription_arn" {
description = "To enable logging to a kinesis stream"
default = ""
}
variable "allow_overnight_scaledown" {
description = "Allow service to be scaled down"
default = true
}
variable "overnight_scaledown_min_count" {
description = "Minimum task count overnight"
default = "0"
}
variable "overnight_scaledown_start_hour" {
description = "From when a service can be scaled down (Hour in UTC)"
default = "22"
}
variable "overnight_scaledown_end_hour" {
description = "When to bring service back to full strength (Hour in UTC)"
default = "06"
}
variable "application_secrets" {
description = "A list of application specific secret names that can be found in aws secrets manager"
type = "list"
default = []
}
variable "platform_secrets" {
description = "A list of common secret names for \"the platform\" that can be found in secrets manager"
type = "list"
default = []
}
variable "network_mode" {
description = "Network mode valid values are: none, bridge, awsvpc, and host. Default is bridge (See: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html)"
type = "string"
default = "bridge"
}
variable "tags" {
description = "Tags added to the ecs service resource"
type = "map"
default = {}
}
variable "health_check_grace_period_seconds" {
description = "Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Default 0."
type = "string"
default = "0"
}
# The same as https://github.com/mergermarket/tf_load_balanced_ecs_service/blob/master/variables.tf#L50-L78
variable "health_check_interval" {
description = "The approximate amount of time, in seconds, between health checks of an individual target. Minimum value 5 seconds, Maximum value 300 seconds."
type = "string"
default = "5"
}
variable "health_check_timeout" {
description = "The amount of time, in seconds, during which no response means a failed health check."
type = "string"
default = "4"
}
variable "health_check_healthy_threshold" {
description = "The number of consecutive health checks successes required before considering an unhealthy target healthy."
type = "string"
default = "2"
}
variable "health_check_unhealthy_threshold" {
description = "The number of consecutive health check failures required before considering the target unhealthy."
type = "string"
default = "2"
}
variable "stop_timeout" {
description = "The duration is seconds to wait before the container is forcefully killed. Default 30s, max 120s."
default = "none"
}