forked from infrablocks/terraform-aws-ecs-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
217 lines (203 loc) · 7.5 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
variable "region" {
description = "The region into which to deploy the service."
type = string
}
variable "vpc_id" {
description = "The ID of the VPC into which to deploy the service."
type = string
default = null
}
variable "subnet_ids" {
description = "The IDs of the subnets in which to create ENIs when the service task network mode is \"awsvpc\"."
type = list(string)
default = []
}
variable "component" {
description = "The component this service will contain."
type = string
}
variable "deployment_identifier" {
description = "An identifier for this instantiation."
type = string
}
variable "service_task_container_definitions" {
description = "A template for the container definitions in the task."
default = ""
type = string
}
variable "service_task_network_mode" {
description = "The network mode used for the containers in the task."
default = "bridge"
type = string
}
variable "service_task_pid_mode" {
description = "The process namespace used for the containers in the task."
default = null
type = string
}
variable "service_name" {
description = "The name of the service being created."
type = string
}
variable "service_image" {
description = "The docker image (including version) to deploy."
default = ""
type = string
}
variable "service_command" {
description = "The command to run to start the container."
type = list(string)
default = []
}
variable "service_port" {
description = "The port the containers will be listening on."
type = string
}
variable "service_desired_count" {
description = "The desired number of tasks in the service."
type = number
default = 3
}
variable "service_deployment_maximum_percent" {
description = "The maximum percentage of the desired count that can be running."
type = number
default = 200
}
variable "service_deployment_minimum_healthy_percent" {
description = "The minimum healthy percentage of the desired count to keep running."
type = number
default = 50
}
variable "service_health_check_grace_period_seconds" {
description = "The number of seconds to wait for the service to start up before starting load balancer health checks."
type = number
default = 0
}
variable "attach_to_load_balancer" {
description = "Whether or not this service should attach to a load balancer (\"yes\" or \"no\")."
type = string
default = "yes"
}
variable "service_elb_name" {
description = "The name of the ELB to configure to point at the service containers."
type = string
default = ""
}
variable "target_group_arn" {
description = "The arn of the target group to point at the service containers."
type = string
default = ""
}
variable "target_container_name" {
description = "The name of the container to which the load balancer should route traffic. Defaults to the service_name."
type = string
default = ""
}
variable "target_port" {
description = "The port to which the load balancer should route traffic. Defaults to the service_port."
type = string
default = ""
}
variable "register_in_service_discovery" {
description = "Whether or not this service should be registered in service discovery (\"yes\" or \"no\")."
type = string
default = "no"
}
variable "service_discovery_create_registry" {
description = "Whether or not to create a service discovery registry for this service (\"yes\" or \"no\")."
type = string
default = "yes"
}
variable "service_discovery_namespace_id" {
description = "The ID of the service discovery namespace in which to create the service discovery registry. Required if service_discovery_create_registry is \"yes\"."
type = string
default = ""
}
variable "service_discovery_registry_arn" {
description = "The ARN of the service discovery registry into which to register the service. Required if service_discovery_create_registry is \"no\"."
type = string
default = ""
}
variable "service_discovery_record_type" {
description = "The type of record to create when registering the service in service discovery."
type = string
default = "SRV"
}
variable "service_discovery_container_name" {
description = "The container name to use when registering the service in service discovery. Defaults to the service name."
type = string
default = ""
}
variable "service_discovery_container_port" {
description = "The container port to use when registering the service in service discovery. Defaults to the service port."
type = string
default = ""
}
variable "associate_default_security_group" {
description = "Whether or not to create and associate a default security group for the tasks created by this service (\"yes\" or \"no\"). Defaults to \"yes\". Only applicable when service_task_network_mode is \"awsvpc\"."
type = string
default = "yes"
}
variable "include_default_ingress_rule" {
description = "Whether or not to include the default ingress rule in the default security group for the tasks created by this service (\"yes\" or \"no\"). Defaults to \"yes\". Only applicable when service_task_network_mode is \"awsvpc\"."
type = string
default = "yes"
}
variable "include_default_egress_rule" {
description = "Whether or not to include the default egress rule in the default security group for the tasks created by this service (\"yes\" or \"no\"). Defaults to \"yes\". Only applicable when service_task_network_mode is \"awsvpc\"."
type = string
default = "yes"
}
variable "default_security_group_ingress_cidrs" {
description = "The CIDRs allowed access to containers when using the default security group."
type = list(string)
default = ["10.0.0.0/8"]
}
variable "default_security_group_egress_cidrs" {
description = "The CIDRs accessible from containers when using the default security group."
type = list(string)
default = ["0.0.0.0/0"]
}
variable "service_role" {
description = "The ARN of the service task role to use."
type = string
default = ""
}
variable "service_volumes" {
description = "A list of volumes to make available to the containers in the service."
type = list(map(string))
default = []
}
variable "scheduling_strategy" {
description = "The scheduling strategy to use for this service (\"REPLICA\" or \"DAEMON\")."
type = string
default = "REPLICA"
}
variable "placement_constraints" {
description = "A list of placement constraints for the service."
type = list(map(string))
default = []
}
variable "ecs_cluster_id" {
description = "The ID of the ECS cluster in which to deploy the service."
type = string
}
variable "ecs_cluster_service_role_arn" {
description = "The ARN of the IAM role to provide to ECS to manage the service."
type = string
}
variable "include_log_group" {
description = "Whether or not to create a log group for the service (\"yes\" or \"no\"). Defaults to \"yes\"."
type = string
default = "yes"
}
variable "log_group_retention" {
description = "The number of days you want to retain log events. See cloudwatch_log_group for possible values. Defaults to 0 (forever)."
type = number
default = 0
}
variable "force_new_deployment" {
description = "Whether or not to force a new deployment of the service (\"yes\" or \"no\"). Defaults to \"no\"."
type = string
default = "no"
}