You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46-35
Original file line number
Diff line number
Diff line change
@@ -114,49 +114,60 @@ Available targets:
114
114
lint Lint terraform code
115
115
116
116
```
117
+
## Requirements
118
+
119
+
| Name | Version |
120
+
|------|---------|
121
+
| terraform |~> 0.12.0 |
122
+
| local |~> 1.2 |
123
+
124
+
## Providers
125
+
126
+
No provider.
127
+
117
128
## Inputs
118
129
119
130
| Name | Description | Type | Default | Required |
120
-
|------|-------------|:----:|:-----:|:-----:|
121
-
| command | The command that is passed to the container | list(string) |`null`| no |
122
-
|container_cpu| 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 | number |`256`| no |
123
-
|container_depends_on| The dependencies defined for container startup and shutdown. A container can contain multiple dependencies. When a dependency is defined for container startup, for container shutdown it is reversed. The condition can be one of START, COMPLETE, SUCCESS or HEALTHY | object |`null`| no |
124
-
|container_image| The image used to start the container. Images in the Docker Hub registry available by default | string |-| yes |
125
-
|container_memory| 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 | number |`256`| no |
126
-
|container_memory_reservation| 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 | number |`128`| no |
127
-
|container_name| The name of the container. Up to 255 characters ([a-z], [A-Z], [0-9], -, _ allowed) | string |-| yes |
128
-
|dns_servers| Container DNS servers. This is a list of strings specifying the IP addresses of the DNS servers | list(string) |`null`| no |
129
-
|docker_labels| The configuration options to send to the `docker_labels`| map(string) |`null`| no |
130
-
| entrypoint | The entry point that is passed to the container | list(string) |`null`| no |
131
-
| environment | The environment variables to pass to the container. This is a list of maps | object |`null`| no |
132
-
|environment_files| One or more files containing the environment variables to pass to the container. This maps to the --env-file option to docker run. The file must be hosted in Amazon S3. This option is only available to tasks using the EC2 launch type. This is a list of maps | object |`null`| no |
133
-
| essential | 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 | bool |`true`| no |
134
-
|extra_hosts| A list of hostnames and IP address mappings to append to the /etc/hosts file on the container. This is a list of maps | object |`null`| no |
135
-
|firelens_configuration| The FireLens configuration for the container. This is used to specify and configure a log router for container logs. For more details, see https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_FirelensConfiguration.html| object |`null`| no |
136
-
| healthcheck | A map containing command (string), timeout, interval (duration in seconds), retries (1-10, number of times to retry before marking container unhealthy), and startPeriod (0-300, optional grace period to wait, in seconds, before failed healthchecks count toward retries) | object |`null`| no |
137
-
| links | List of container names this container can communicate with without port mappings | list(string) |`null`| no |
138
-
|linux_parameters| Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more details, see https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_LinuxParameters.html| object |`null`| no |
139
-
|log_configuration| 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| object|`null`| no |
140
-
|mount_points| Container mount points. This is a list of maps, where each map should contain a `containerPath` and `sourceVolume`. The `readOnly` key is optional. | list |`<list>`| no |
141
-
|port_mappings| 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 | object|`<list>`| no |
142
-
| privileged | 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. | bool |`null`| no |
143
-
|readonly_root_filesystem| 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 | bool |`false`| no |
144
-
|repository_credentials| Container repository credentials; required when using a private repo. This map currently supports a single key; "credentialsParameter", which should be the ARN of a Secrets Manager's secret holding the credentials | map(string) |`null`| no |
145
-
| secrets | The secrets to pass to the container. This is a list of maps | object |`null`| no |
146
-
|start_timeout| Time duration (in seconds) to wait before giving up on resolving dependencies for a container | number |`30`| no |
147
-
|stop_timeout| Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own | number |`30`| no |
148
-
|system_controls| A list of namespaced kernel parameters to set in the container, mapping to the --sysctl option to docker run. This is a list of maps: { namespace = "", value = ""} | list(map(string)) |`null`| no |
149
-
| ulimits | Container ulimit settings. This is a list of maps, where each map should contain "name", "hardLimit" and "softLimit" | object |`null`| no |
150
-
| user | The user to run as inside the container. Can be any of these formats: user, user:group, uid, uid:gid, user:gid, uid:group| string |`null`| no |
151
-
|volumes_from| A list of VolumesFrom maps which contain "sourceContainer" (name of the container that has the volumes to mount) and "readOnly" (whether the container can write to the volume) | object |`null`| no |
152
-
|working_directory| The working directory to run commands inside the container | string |`null`| no |
| command | The command that is passed to the container |`list(string)`|`null`| no |
133
+
|container\_cpu| 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 |`number`|`256`| no |
134
+
|container\_depends\_on| The dependencies defined for container startup and shutdown. A container can contain multiple dependencies. When a dependency is defined for container startup, for container shutdown it is reversed. The condition can be one of START, COMPLETE, SUCCESS or HEALTHY |<pre>list(object({<br> containerName = string<br> condition = string<br> }))</pre>|`null`| no |
135
+
|container\_image| The image used to start the container. Images in the Docker Hub registry available by default |`string`|n/a| yes |
136
+
|container\_memory| 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 |`number`|`256`| no |
137
+
|container\_memory\_reservation| 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 |`number`|`128`| no |
138
+
|container\_name| The name of the container. Up to 255 characters ([a-z], [A-Z], [0-9], -, \_ allowed) |`string`|n/a| yes |
139
+
|dns\_servers| Container DNS servers. This is a list of strings specifying the IP addresses of the DNS servers |`list(string)`|`null`| no |
140
+
|docker\_labels| The configuration options to send to the `docker_labels`|`map(string)`|`null`| no |
141
+
| entrypoint | The entry point that is passed to the container |`list(string)`|`null`| no |
142
+
| environment | The environment variables to pass to the container. This is a list of maps |<pre>list(object({<br> name = string<br> value = string<br> }))</pre>|`null`| no |
143
+
|environment\_files| One or more files containing the environment variables to pass to the container. This maps to the --env-file option to docker run. The file must be hosted in Amazon S3. This option is only available to tasks using the EC2 launch type. This is a list of maps |<pre>list(object({<br> value = string<br> type = string<br> }))</pre>|`null`| no |
144
+
| essential | 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 |`bool`|`true`| no |
145
+
|extra\_hosts| A list of hostnames and IP address mappings to append to the /etc/hosts file on the container. This is a list of maps |<pre>list(object({<br> ipAddress = string<br> hostname = string<br> }))</pre>|`null`| no |
146
+
|firelens\_configuration| The FireLens configuration for the container. This is used to specify and configure a log router for container logs. For more details, see https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_FirelensConfiguration.html|<pre>object({<br> type = string<br> options = map(string)<br> })</pre>|`null`| no |
147
+
| healthcheck | A map containing command (string), timeout, interval (duration in seconds), retries (1-10, number of times to retry before marking container unhealthy), and startPeriod (0-300, optional grace period to wait, in seconds, before failed healthchecks count toward retries) |<pre>object({<br> command = list(string)<br> retries = number<br> timeout = number<br> interval = number<br> startPeriod = number<br> })</pre>|`null`| no |
148
+
| links | List of container names this container can communicate with without port mappings |`list(string)`|`null`| no |
149
+
|linux\_parameters| Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more details, see https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_LinuxParameters.html|<pre>object({<br> capabilities = object({<br> add = list(string)<br> drop = list(string)<br> })<br> devices = list(object({<br> containerPath = string<br> hostPath = string<br> permissions = list(string)<br> }))<br> initProcessEnabled = bool<br> maxSwap = number<br> sharedMemorySize = number<br> swappiness = number<br> tmpfs = list(object({<br> containerPath = string<br> mountOptions = list(string)<br> size = number<br> }))<br> })</pre>|`null`| no |
150
+
|log\_configuration| 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|<pre>object({<br> logDriver = string<br> options = map(string)<br> secretOptions = list(object({<br> name = string<br> valueFrom = string<br> }))<br> })</pre> | <pre>{<br> "logDriver": null,<br> "options": {},<br> "secretOptions": []<br>}</pre>| no |
151
+
|mount\_points| Container mount points. This is a list of maps, where each map should contain a `containerPath` and `sourceVolume`. The `readOnly` key is optional. |`list`|`[]`| no |
152
+
|port\_mappings| 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 |<pre>list(object({<br> containerPort = number<br> hostPort = number<br> protocol = string<br> }))</pre> |`[]`| no |
153
+
| privileged | 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. |`bool`|`null`| no |
154
+
|readonly\_root\_filesystem| 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 |`bool`|`false`| no |
155
+
|repository\_credentials| Container repository credentials; required when using a private repo. This map currently supports a single key; "credentialsParameter", which should be the ARN of a Secrets Manager's secret holding the credentials |`map(string)`|`null`| no |
156
+
| secrets | The secrets to pass to the container. This is a list of maps |<pre>list(object({<br> name = string<br> valueFrom = string<br> }))</pre>|`null`| no |
157
+
|start\_timeout| Time duration (in seconds) to wait before giving up on resolving dependencies for a container |`number`|`30`| no |
158
+
|stop\_timeout| Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own |`number`|`30`| no |
159
+
|system\_controls| A list of namespaced kernel parameters to set in the container, mapping to the --sysctl option to docker run. This is a list of maps: { namespace = "", value = ""} |`list(map(string))`|`null`| no |
160
+
| ulimits | Container ulimit settings. This is a list of maps, where each map should contain "name", "hardLimit" and "softLimit" |<pre>list(object({<br> name = string<br> hardLimit = number<br> softLimit = number<br> }))</pre>|`null`| no |
161
+
| user | The user to run as inside the container. Can be any of these formats: user, user:group, uid, uid:gid, user:gid, uid:group|`string`|`null`| no |
162
+
|volumes\_from| A list of VolumesFrom maps which contain "sourceContainer" (name of the container that has the volumes to mount) and "readOnly" (whether the container can write to the volume) |<pre>list(object({<br> sourceContainer = string<br> readOnly = bool<br> }))</pre>|`null`| no |
163
+
|working\_directory| The working directory to run commands inside the container |`string`|`null`| no |
153
164
154
165
## Outputs
155
166
156
167
| Name | Description |
157
168
|------|-------------|
158
-
| json | JSON encoded list of container definitions for use with other terraform resources such as aws_ecs_task_definition|
159
-
|json_map| JSON encoded container definitions for use with other terraform resources such as aws_ecs_task_definition|
169
+
| json | JSON encoded list of container definitions for use with other terraform resources such as aws\_ecs\_task\_definition|
170
+
|json\_map| JSON encoded container definitions for use with other terraform resources such as aws\_ecs\_task\_definition|
0 commit comments