-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvariables.tf
203 lines (173 loc) · 6.15 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
variable "name" {
description = "The Service name"
type = string
}
################################################################################
# ECS Service
################################################################################
variable "cluster_id" {
description = "Cluster ID"
type = string
}
variable "launch_type" {
description = "Launch type"
type = string
default = "EC2"
}
variable "platform_version" {
description = "Platform version (applicable for FARGATE launch type)"
type = string
default = "LATEST"
}
variable "desired_count" {
description = "Number of instances of the task definition to place and keep running."
type = number
default = 0
}
variable "enable_ecs_managed_tags" {
description = "Specifies whether to enable Amazon ECS managed tags for the tasks within the service"
type = bool
default = true
}
variable "enable_execute_command" {
description = "Specifies whether to enable Amazon ECS Exec for the tasks within the service"
type = bool
default = false
}
variable "propagate_tags" {
description = "Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION"
type = string
default = "TASK_DEFINITION"
}
variable "deployment_controller_type" {
description = "Type of deployment controller. Valid values are `CODE_DEPLOY` and `ECS`"
type = string
default = "ECS"
}
variable "service_placement_constraints" {
description = "The rules that are taken into consideration during task placement. Maximum number of placement_constraints is 10."
type = list(object({
type = string
expression = string
}))
default = []
}
variable "network_mode" {
description = "Networking Mode Type"
type = string
default = "awsvpc"
}
variable "subnets" {
description = "Private subnets for ECS"
type = list(string)
default = null
}
variable "security_groups" {
description = "Security group IDs to attach to your ECS Service"
type = list(string)
default = null
}
variable "assign_public_ip" {
description = "Flag for enabling/disabling public IP for ECS Containers"
type = bool
default = false
}
variable "ordered_placement_strategy" {
description = "Service level strategy rules that are taken into consideration during task placement."
type = list(object({
type = string
field = string
}))
default = []
}
variable "ecs_load_balancers" {
description = "Configuration block for load balancers."
type = list(any)
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. Only valid for services configured to use load balancers"
type = number
default = null
}
variable "service_registries" {
description = "Service discovery registries for the service. The maximum number of service_registries blocks is 1"
type = list(any)
default = []
}
variable "deployment_maximum_percent" {
description = "Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy."
type = number
default = 200
}
variable "deployment_minimum_healthy_percent" {
description = "Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment."
type = number
default = 100
}
variable "deployment_circuit_breaker" {
description = "Configuration block for deployment circuit breaker"
type = any
default = {}
}
variable "capacity_provider_strategy" {
description = "The capacity provider strategy to use by ecs service. Can be one or more."
type = list(map(any))
default = []
}
################################################################################
# ECS Task Definition
################################################################################
variable "container_definitions" {
description = "A list of container definitions in JSON format that describe the different containers that make up your task"
type = string
}
variable "task_cpu" {
description = "Number of cpu units used by the task. If the requires_compatibilities is FARGATE this field is required."
type = number
default = 256
}
variable "task_memory" {
description = "Amount (in MiB) of memory used by the task. If the requires_compatibilities is FARGATE this field is required."
type = number
default = 512
}
variable "execution_role_arn" {
description = "ECS excution role arn"
type = string
default = ""
}
variable "task_role_arn" {
description = "Task role arn"
type = string
default = ""
}
variable "task_placement_constraints" {
description = "The rules that are taken into consideration during task placement. Maximum number of placement_constraints is 10"
type = list(object({
type = string
expression = string
}))
default = []
}
################################################################################
# Volume Config
################################################################################
variable "efs_volumes" {
description = "Task EFS volume definitions as list of configuration objects. You cannot define both Docker volumes and EFS volumes on the same task definition."
type = list(any)
default = []
}
variable "docker_volumes" {
description = "Task docker volume definitions as list of configuration objects. You cannot define both Docker volumes and EFS volumes on the same task definition."
type = list(any)
default = []
}
################################################################################
# Tagging
################################################################################
variable "tags" {
description = "Tags for ECS cluster"
type = map(string)
default = {}
}