-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
316 lines (259 loc) · 6.95 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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
variable "service_name" {
description = "Name of the service."
type = string
}
variable "service_cpu" {
description = "CPU amount for the service."
type = number
}
variable "service_memory" {
description = "Memory amount for the service."
type = number
}
variable "container_definitions" {
type = any
default = {}
description = "Custom container definitions."
}
variable "requires_compatibilities" {
type = list(string)
default = ["FARGATE"]
description = "Compatibilities for ECS task. Available: 'FARGATE', 'FARGATE_SPOT', 'EC2' etc."
}
variable "network_mode" {
description = "Network mode for task. For example 'awsvpc' or 'bridge' etc."
default = "awsvpc"
type = string
}
variable "environment" {
description = "Environment name. For example 'production'"
type = string
}
variable "desired_count" {
description = "Desired count for service."
type = number
default = null
}
variable "cluster_name" {
description = "Name of the ECS Cluster."
type = string
}
variable "launch_type" {
description = "Launch type for service: 'FARGATE', 'EC2' etc."
type = string
default = "FARGATE"
}
variable "service_subnets" {
description = "Subnets for service"
type = list(string)
}
variable "lb_listener_arn" {
description = "Listener arn for load balancer connection"
type = string
default = null
}
variable "deployment_maximum_percent" {
description = "deployment_maximum_percent. For example 200 will create twice more container and if everything is ok, deployment is succesfull."
default = 200
type = number
}
variable "deployment_minimum_healthy_percent" {
description = "deployment_minimum_healthy_percent."
default = 100
type = number
}
variable "health_check_grace_period_seconds" {
description = "health_check_grace_period_seconds"
type = number
default = null
}
variable "health_check" {
description = "Custom healthcheck for target group."
type = any
default = null
}
variable "vpc_id" {
description = "VPC id."
type = string
}
variable "deregistration_delay" {
default = 5
type = number
description = "Deregistration delay for target group."
}
#variable "target_group_arn" {
# default = null
# description = "Custom target group arn."
# type = string
#}
variable "route_53_zone_id" {
description = "Route 53 zone id."
type = string
default = null
}
variable "task_role_policy_arns" {
description = "Additional policies to attach to task role of ECS container."
type = list(string)
default = []
}
variable "task_exec_role_policy_arns" {
description = "Additional policies to attach to task execution role of ECS container."
type = list(string)
default = []
}
variable "lb_arn" {
description = "Load balancer arn."
type = string
default = null
}
variable "assign_public_ip" {
default = false
type = bool
description = "Assign_public_ip set true if you are using public subnets."
}
variable "security_groups" {
description = "additional security_groups for service"
type = list(string)
default = []
}
variable "retention_in_days" {
description = "retention_in_days"
type = number
default = 60
}
variable "tg_target_type" {
description = "target group target type(ip or instance etc)"
default = "ip"
type = string
}
variable "tg_protocol" {
description = "target group protocol(for example 'HTTP' or 'TCP')"
default = "HTTP"
type = string
}
variable "create_ssl" {
type = bool
default = true
description = "defines if create ssl for services domains"
}
variable "vpc_cidr_block" {
type = string
default = null
description = "cidr block for vpc. Use that variable when you dont have previously created VPC"
}
variable "route_53_zone_name" {
type = string
default = null
description = "route 53 zone name. Use only when you dont have previously created Route53 zone"
}
variable "lb_dns_name" {
type = string
default = null
description = "Load balancer dns name. Use only if you dont have previously created Load Balancer"
}
# scaling
variable "min_service_tasks" {
description = "Minimum service tasks."
type = number
default = null
}
variable "max_service_tasks" {
description = "Maximum service tasks."
type = number
default = null
}
variable "cpu_scaling_target_value" {
description = "cpu_scaling target_value"
type = number
default = null
}
variable "cpu_scale_in_cooldown" {
description = "cpu scale_in_cooldown"
type = number
default = null
}
variable "cpu_scale_out_cooldown" {
description = "cpu scale_out_cooldown"
type = number
default = null
}
variable "memory_scaling_target_value" {
description = "memory scaling_target_value"
type = number
default = null
}
variable "memory_scale_in_cooldown" {
description = "memory scale_in_cooldown"
type = number
default = null
}
variable "memory_scale_out_cooldown" {
description = "memory scale_out_cooldown"
type = number
default = null
}
variable "capacity_provider_strategy" {
description = "capacity_provider_strategy"
type = any
default = {}
}
variable "ordered_placement_strategy" {
description = "ordered_placement_strategy"
type = any
default = {}
}
variable "placement_constraints" {
description = "placement_constraints"
type = any
default = {}
}
variable "parameter_prefix" {
description = "prefix for parameter store parameter. For example '/develop/service/'. So parameter 'DEBUG' will have '/develop/service/DEBUG' name on the parameter store"
type = string
default = null
}
variable "deployment_circuit_breaker" {
description = "deployment_circuit_breaker configuration"
type = any
default = {}
}
variable "lb_zone_id" {
description = "load balancer zone id"
type = string
default = null
}
variable "create_service_discovery" {
description = "creates service discovery service and connects in to ecs service"
type = bool
default = false
}
variable "discovery_registry_id" {
description = "service discovery registry_id"
type = string
default = null
}
variable "protocol_version" {
description = "target group protocol version"
type = string
default = null
}
variable "docker_volume" {
description = "docker volume"
type = any
default = null
}
variable "efs_volume" {
description = "efs volume"
type = any
default = null
}
variable "runtime_platform" {
description = "runtime platform"
type = any
default = null
}
variable "external_dns" {
description = "when you dont have route53 zone, you can use external dns"
type = any
default = null
}