-
-
Notifications
You must be signed in to change notification settings - Fork 248
/
Copy pathvariables.tf
149 lines (128 loc) · 5.46 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
variable "region" {
type = string
}
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"
default = null
}
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"
default = null
}
# https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PortMapping.html
variable "port_mappings" {
type = list(object({
containerPort = number
hostPort = optional(number)
protocol = optional(string)
name = optional(string)
appProtocol = optional(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"
default = null
}
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 = 0
}
variable "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"
default = true
}
variable "entrypoint" {
type = list(string)
description = "The entry point that is passed to the container"
default = null
}
variable "command" {
type = list(string)
description = "The command that is passed to the container"
default = null
}
variable "working_directory" {
type = string
description = "The working directory to run commands inside the container"
default = null
}
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. map_environment overrides environment"
default = null
}
# https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_HostEntry.html
variable "extra_hosts" {
type = list(object({
hostname = string
ipAddress = string
}))
description = "A list of hostnames and IP address mappings to append to the /etc/hosts file on the container. This is a list of maps"
default = null
}
variable "map_environment" {
type = map(string)
description = "The environment variables to pass to the container. This is a map of string: {key: value}. map_environment overrides environment"
default = null
}
variable "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"
default = false
}
# https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_LogConfiguration.html
variable "log_configuration" {
type = object({
logDriver = string
options = optional(map(string))
secretOptions = optional(list(object({
name = string
valueFrom = string
})))
})
description = "Log configuration options to send to a custom log driver for the container. For more details, see https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_LogConfiguration.html"
default = null
}
variable "privileged" {
type = bool
description = "When this variable is `true`, the container is given elevated privileges on the host container instance (similar to the root user). This parameter is not supported for Windows containers or tasks using the Fargate launch type."
default = null
}
variable "hostname" {
type = string
description = "The hostname to use for your container."
default = null
}
variable "disable_networking" {
type = bool
description = "When this parameter is true, networking is disabled within the container."
default = null
}
variable "interactive" {
type = bool
description = "When this parameter is true, this allows you to deploy containerized applications that require stdin or a tty to be allocated."
default = null
}
variable "pseudo_terminal" {
type = bool
description = "When this parameter is true, a TTY is allocated. "
default = null
}
variable "docker_security_options" {
type = list(string)
description = "A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems."
default = null
}