-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathvariables.tf
278 lines (232 loc) · 7.32 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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
variable "env" {
description = "Environment name"
}
variable "platform_config" {
description = "Platform configuration"
type = map(string)
default = {}
}
variable "release" {
type = map(string)
description = "Metadata about the release"
}
variable "secrets" {
type = map(string)
description = "Secret credentials fetched using credstash"
default = {}
}
variable "common_application_environment" {
description = "Environment parameters passed to the container for all environments"
type = map(string)
default = {}
}
variable "application_environment" {
description = "Environment specific parameters passed to the container"
type = map(string)
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 "privileged" {
description = "Gives the container privileged access to the host"
type = bool
default = false
}
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
default = ""
}
variable "multiple_target_group_arns" {
description = "Mutiple target group ARNs to allow connection to multiple loadbalancers"
type = list(any)
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(string)
default = {}
}
variable "container_mountpoint" {
description = "Map containing 'sourceVolume', 'containerPath' and 'readOnly' (optional) to map a volume into a container."
type = map(string)
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(string)
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(string)
default = []
}
variable "platform_secrets" {
description = "A list of common secret names for \"the platform\" that can be found in secrets manager"
type = list(string)
default = []
}
variable "is_test" {
description = "For testing only. Stops the call to AWS for sts"
default = false
}
variable "image_id" {
description = "ECR image_id for the ecs container"
type = string
default = ""
}
variable "network_mode" {
description = "The Docker networking mode to use for the containers in the task"
type = string
default = "bridge"
}
variable "network_configuration_subnets" {
description = "needed for network_mode awsvpc "
type = list(any)
default = []
}
variable "network_configuration_security_groups" {
description = "needed for network_mode awsvpc "
type = list(any)
default = []
}
variable "add_datadog_feed" {
description = "Flag to control adding subscription filter to CW loggroup"
type = bool
default = true
}
variable "pack_and_distinct" {
description = "Enable distinct instance and task binpacking for better cluster utilisation. Enter 'true' for clusters with auto scaling groups. Enter 'false' for clusters with no ASG and instant counts less than or equal to desired tasks"
type = string
default = "false"
}
variable "stop_timeout" {
description = "The duration is seconds to wait before the container is forcefully killed. Default 30s, max 120s."
default = "none"
}
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"
}
variable "deployment_timeout" {
description = "Timeout to wait for the deployment to be finished [seconds]."
type = number
default = 600
}
variable "scaling_metrics" {
description = "Allow service to be scaled down"
type = list(any)
default = []
}
variable "placement_constraint_on_demand_only" {
description = "Add placement constraint to only run on on-demand instances"
type = bool
default = false
}
variable "extra_hosts" {
description = "values to add to /etc/hosts in the container"
type = list(object({
hostname = string
ipAddress = string
}))
default = []
}
variable "image_build_details" {
description = "Details of the image build"
type = map(string)
default = {
"buildx" = "false",
"platforms" = ""
}
}
variable "spot_capacity_percentage" {
default = 33
type = number
description = "Percentage of tasks to run on spot instances"
}