-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
192 lines (161 loc) · 6.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
variable "additional_vpc_id" {
type = list(string)
description = "Additional vpc ids that should get associated with the route53 hosted-zone"
default = []
}
variable "cloudwatch_log_group_enabled" {
type = bool
description = "A boolean to disable cloudwatch log group creation"
default = true
}
variable "container_cpu" {
type = number
description = "The number of cpu units to reserve for the container. This is optional for tasks using Fargate launch type and the total amount of container_cpu of all containers in a task will need to be lower than the task-level cpu value"
default = 512
}
variable "container_image_tag" {
type = string
description = "The image tag used to start the container. Images in the Docker Hub registry available by default"
default = "v2.11.0"
}
variable "container_image_url" {
type = string
description = "The image tag used to start the container. Images in the Docker Hub registry available by default"
default = "traefik"
}
variable "container_memory" {
type = number
description = "The amount of memory (in MiB) to allow the container to use. This is a hard limit, if the container attempts to exceed the container_memory, the container is killed. This field is optional for Fargate launch type and the total amount of container_memory of all containers in a task will need to be lower than the task memory value"
default = 256
}
variable "deployment_maximum_percent" {
type = number
description = "The upper limit of the number of tasks (as a percentage of `desired_count`) that can be running in a service during a deployment"
default = 150
}
variable "deployment_minimum_healthy_percent" {
type = number
description = "The lower limit (as a percentage of `desired_count`) of the number of tasks that must remain running and healthy in a service during a deployment"
default = 50
}
variable "desired_count" {
type = number
description = "The number of instances of the task definition to place and keep running"
default = 3
}
variable "dns_record_client_routing_policy" {
description = "Indicates how traffic is distributed among the load balancer Availability Zones. Possible values are any_availability_zone, availability_zone_affinity (default), or partial_availability_zone_affinity. Only valid for network type load balancers."
type = string
default = "availability_zone_affinity"
}
variable "domain" {
type = string
description = "Domain for the hosted-zone"
}
variable "ecs_cluster_arn" {
type = string
description = "The ECS Cluster ARN where ECS Service will be provisioned"
}
variable "ecs_service_role_enabled" {
type = bool
description = "Whether or not to create the ecs service aws_iam_role resource"
default = false
}
variable "https_listeners_certificate_arn" {
type = string
description = "ARN of the default SSL server certificate. Exactly one certificate is required if the protocol is HTTPS"
default = null
}
variable "ignore_changes_task_definition" {
type = bool
description = "Ignore changes (like environment variables) to the ECS task definition"
default = false
}
variable "initial_vpc_id" {
type = string
description = "VPC id to be used when creating the `aws_route53_zone` resource"
}
variable "internal" {
description = "Boolean determining if the load balancer is internal or externally facing."
type = bool
default = true
}
variable "label_orders" {
type = object({
cloudwatch = optional(list(string)),
ecs = optional(list(string)),
iam = optional(list(string)),
ssm = optional(list(string)),
vpc = optional(list(string))
})
default = {}
description = "Overrides the `labels_order` for the different labels to modify ID elements appear in the `id`"
}
variable "launch_type" {
type = string
description = "The ECS launch type (valid options: FARGATE or EC2)"
default = "EC2"
}
variable "load_balancer_type" {
description = "The type of load balancer to create. Possible values are application or network."
type = string
default = "network"
}
variable "log_retention_in_days" {
type = number
description = "The number of days to retain logs for the log group"
default = 1
}
variable "network_mode" {
type = string
description = "The network mode to use for the task. This is required to be `awsvpc` for `FARGATE` `launch_type` or `null` for `EC2` `launch_type`"
default = null
}
variable "port_gateway" {
type = number
description = "Define the gateway port"
default = 8088
}
variable "port_health" {
type = number
description = "Define the health port"
default = 8090
}
variable "port_metadata" {
type = number
description = "Define the metadata port"
default = 8070
}
variable "port_metrics" {
type = number
description = "Define the prometheus metrics port"
default = 9100
}
variable "prometheus_metrics_enabled" {
type = bool
description = "A boolean to enable/disable traefik prometheus metrics. Default is true"
default = true
}
variable "subnets" {
description = "A list of subnets to associate with the load balancer. e.g. ['subnet-1a2b3c4d','subnet-1a2b3c4e','subnet-1a2b3c4f']"
type = list(string)
}
variable "task_cpu" {
type = number
description = "The number of CPU units used by the task. If using `FARGATE` launch type `task_cpu` must match [supported memory values](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size)"
default = 1024
}
variable "task_memory" {
type = number
description = "The amount of memory (in MiB) used by the task. If using Fargate launch type `task_memory` must match [supported cpu value](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size)"
default = 512
}
variable "vpc_id" {
description = "VPC id where the load balancer and other resources will be deployed."
type = string
}
variable "wait_for_steady_state" {
type = bool
description = "If true, it will wait for the service to reach a steady state (like aws ecs wait services-stable) before continuing"
default = true
}