-
-
Notifications
You must be signed in to change notification settings - Fork 196
/
variables.tf
140 lines (114 loc) · 5.3 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
variable "region" {
type = string
description = "AWS Region"
}
variable "availability_zones" {
type = list(string)
description = "List of availability zones"
}
variable "vpc_cidr_block" {
type = string
description = "VPC CIDR block"
}
variable "ecs_launch_type" {
type = string
description = "ECS launch type"
}
variable "container_name" {
type = string
description = "The name of the container. Up to 255 characters ([a-z], [A-Z], [0-9], -, _ allowed)"
}
variable "container_image" {
type = string
description = "The image used to start the container. Images in the Docker Hub registry available by default"
}
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"
}
variable "container_memory_reservation" {
type = number
description = "The amount of memory (in MiB) to reserve for the container. If container needs to exceed this threshold, it can do so up to the set container_memory hard limit"
}
variable "container_port_mappings" {
type = list(object({
containerPort = number
hostPort = number
protocol = string
}))
description = "The port mappings to configure for the container. This is a list of maps. Each map should contain \"containerPort\", \"hostPort\", and \"protocol\", where \"protocol\" is one of \"tcp\" or \"udp\". If using containers in a task with the awsvpc or host network mode, the hostPort can either be left blank or set to the same value as the containerPort"
}
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"
}
variable "container_essential" {
type = bool
description = "Determines whether all other containers in a task are stopped, if this container fails or stops for any reason. Due to how Terraform type casts booleans in json it is required to double quote this value"
}
variable "container_environment" {
type = list(object({
name = string
value = string
}))
description = "The environment variables to pass to the container. This is a list of maps"
}
variable "container_readonly_root_filesystem" {
type = bool
description = "Determines whether a container is given read-only access to its root filesystem. Due to how Terraform type casts booleans in json it is required to double quote this value"
}
variable "network_mode" {
type = string
description = "The network mode to use for the task. This is required to be `awsvpc` for `FARGATE` `launch_type`"
}
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)"
}
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)"
}
variable "desired_count" {
type = number
description = "The number of instances of the task definition to place and keep running"
}
variable "deployment_controller_type" {
type = string
description = "Type of deployment controller. Valid values are `CODE_DEPLOY` and `ECS`"
}
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"
}
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"
}
variable "ignore_changes_task_definition" {
type = bool
description = "Whether to ignore changes in container definition and task definition in the ECS service"
}
variable "assign_public_ip" {
type = bool
description = "Assign a public IP address to the ENI (Fargate launch type only). Valid values are `true` or `false`. Default `false`"
}
variable "propagate_tags" {
type = string
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"
}
variable "ecs_service_enabled" {
type = bool
description = "Whether or not to create the aws_ecs_service resource"
default = true
}
variable "force_new_deployment" {
type = bool
description = "Enable to force a new task deployment of the service."
default = false
}
variable "redeploy_on_apply" {
type = bool
description = "Updates the service to the latest task definition on each apply"
default = false
}