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
+71-53
Original file line number
Diff line number
Diff line change
@@ -106,72 +106,90 @@ Invoking the commands defined below creates an ECS task definition with the foll
106
106
By default, this module creates a task definition with a single container definition. To create a task definition with multiple container definitions, refer to the documentation of the [`merge`](modules/merge) module.
107
107
108
108
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
|[template_file.container_definition](https://registry.terraform.io/providers/hashicorp/template/latest/docs/data-sources/file)| data source |
115
132
116
133
## Inputs
117
134
118
135
| Name | Description | Type | Default | Required |
119
-
|------|-------------|------|---------|:-----:|
120
-
| command | The command that is passed to the container |`list(string)`|`[]`| no |
121
-
| cpu | The number of cpu units reserved for the container |`number`|`0`| no |
122
-
| disableNetworking | When this parameter is true, networking is disabled within the container |`bool`|`false`| no |
123
-
| dnsSearchDomains | A list of DNS search domains that are presented to the container |`list(string)`|`[]`| no |
124
-
| dnsServers | A list of DNS servers that are presented to the container |`list(string)`|`[]`| no |
125
-
| dockerLabels | A key/value map of labels to add to the container |`map(string)`|`{}`| no |
126
-
| dockerSecurityOptions | A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems |`list(string)`|`[]`| no |
127
-
| entryPoint | The entry point that is passed to the container |`list(string)`|`[]`| no |
128
-
| environment | The environment variables to pass to a container |`list(map(string))`|`[]`| no |
129
-
| essential | If the essential parameter of a container is marked as true, and that container fails or stops for any reason, all other containers that are part of the task are stopped |`bool`|`true`| no |
130
-
| execution\_role\_arn | The Amazon Resource Name (ARN) of the task execution role that the Amazon ECS container agent and the Docker daemon can assume |`string`|`""`| no |
131
-
| extraHosts | A list of hostnames and IP address mappings to append to the /etc/hosts file on the container |`list(string)`|`[]`| no |
132
-
| family | You must specify a family for a task definition, which allows you to track multiple versions of the same task definition |`any`| n/a | yes |
133
-
| healthCheck | The health check command and associated configuration parameters for the container |`any`|`{}`| no |
134
-
| hostname | The hostname to use for your container |`string`|`""`| no |
135
-
| image | The image used to start a container |`string`|`""`| no |
136
-
| interactive | When this parameter is true, this allows you to deploy containerized applications that require stdin or a tty to be allocated |`bool`|`false`| no |
137
-
| ipc\_mode | The IPC resource namespace to use for the containers in the task |`string`|`"host"`| no |
138
-
| links | The link parameter allows containers to communicate with each other without the need for port mappings |`list(string)`|`[]`| no |
139
-
| linuxParameters | Linux-specific modifications that are applied to the container, such as Linux KernelCapabilities |`any`|`{}`| no |
140
-
| logConfiguration | The log configuration specification for the container |`any`|`{}`| no |
141
-
| memory | The hard limit (in MiB) of memory to present to the container |`number`|`0`| no |
142
-
| memoryReservation | The soft limit (in MiB) of memory to reserve for the container |`number`|`0`| no |
143
-
| mountPoints | The mount points for data volumes in your container |`list(any)`|`[]`| no |
144
-
| name | The name of a container |`string`|`""`| no |
145
-
| network\_mode | The Docker networking mode to use for the containers in the task |`string`|`"bridge"`| no |
146
-
| pid\_mode | The process namespace to use for the containers in the task |`string`|`"host"`| no |
147
-
| placement\_constraints | An array of placement constraint objects to use for the task |`list(string)`|`[]`| no |
148
-
| portMappings | The list of port mappings for the container |`list(any)`|`[]`| no |
149
-
| privileged | When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user) |`bool`|`false`| no |
150
-
| pseudoTerminal | When this parameter is true, a TTY is allocated |`bool`|`false`| no |
151
-
| readonlyRootFilesystem | When this parameter is true, the container is given read-only access to its root file system |`bool`|`false`| no |
152
-
| register\_task\_definition | Registers a new task definition from the supplied family and containerDefinitions |`bool`|`true`| no |
153
-
| repositoryCredentials | The private repository authentication credentials to use |`map(string)`|`{}`| no |
154
-
| requires\_compatibilities | The launch type required by the task |`list(string)`|`[]`| no |
155
-
| resourceRequirements | The type and amount of a resource to assign to a container |`list(string)`|`[]`| no |
156
-
| secrets | The secrets to pass to the container |`list(map(string))`|`[]`| no |
157
-
| systemControls | A list of namespaced kernel parameters to set in the container |`list(string)`|`[]`| no |
158
-
| tags | The metadata that you apply to the task definition to help you categorize and organize them |`map(string)`|`{}`| no |
159
-
| task\_role\_arn | The short name or full Amazon Resource Name (ARN) of the IAM role that containers in this task can assume |`string`|`""`| no |
160
-
| ulimits | A list of ulimits to set in the container |`list(any)`|`[]`| no |
161
-
| user | The user name to use inside the container |`string`|`""`| no |
162
-
| volumes | A list of volume definitions in JSON format that containers in your task may use |`list(any)`|`[]`| no |
163
-
| volumesFrom | Data volumes to mount from another container |`list(object)`|`[]`| no |
164
-
| workingDirectory | The working directory in which to run commands inside the container |`string`|`""`| no |
| <aname="input_command"></a> [command](#input\_command)| The command that is passed to the container |`list(string)`|`[]`| no |
138
+
| <aname="input_cpu"></a> [cpu](#input\_cpu)| The number of cpu units reserved for the container |`number`|`0`| no |
139
+
| <aname="input_disableNetworking"></a> [disableNetworking](#input\_disableNetworking)| When this parameter is true, networking is disabled within the container |`bool`|`false`| no |
140
+
| <aname="input_dnsSearchDomains"></a> [dnsSearchDomains](#input\_dnsSearchDomains)| A list of DNS search domains that are presented to the container |`list(string)`|`[]`| no |
141
+
| <aname="input_dnsServers"></a> [dnsServers](#input\_dnsServers)| A list of DNS servers that are presented to the container |`list(string)`|`[]`| no |
142
+
| <aname="input_dockerLabels"></a> [dockerLabels](#input\_dockerLabels)| A key/value map of labels to add to the container |`map(string)`|`{}`| no |
143
+
| <aname="input_dockerSecurityOptions"></a> [dockerSecurityOptions](#input\_dockerSecurityOptions)| A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems |`list(string)`|`[]`| no |
144
+
| <aname="input_entryPoint"></a> [entryPoint](#input\_entryPoint)| The entry point that is passed to the container |`list(string)`|`[]`| no |
145
+
| <aname="input_environment"></a> [environment](#input\_environment)| The environment variables to pass to a container |`list(map(string))`|`[]`| no |
146
+
| <aname="input_essential"></a> [essential](#input\_essential)| If the essential parameter of a container is marked as true, and that container fails or stops for any reason, all other containers that are part of the task are stopped |`bool`|`true`| no |
147
+
| <aname="input_execution_role_arn"></a> [execution\_role\_arn](#input\_execution\_role\_arn)| The Amazon Resource Name (ARN) of the task execution role that the Amazon ECS container agent and the Docker daemon can assume |`string`|`""`| no |
148
+
| <aname="input_extraHosts"></a> [extraHosts](#input\_extraHosts)| A list of hostnames and IP address mappings to append to the /etc/hosts file on the container | <pre>list(object({<br> ipAddress = string<br> hostname = string<br> }))</pre> |`[]`| no |
149
+
| <aname="input_family"></a> [family](#input\_family)| You must specify a family for a task definition, which allows you to track multiple versions of the same task definition |`any`| n/a | yes |
150
+
| <aname="input_healthCheck"></a> [healthCheck](#input\_healthCheck)| The health check command and associated configuration parameters for the container |`any`|`{}`| no |
151
+
| <aname="input_hostname"></a> [hostname](#input\_hostname)| The hostname to use for your container |`string`|`""`| no |
152
+
| <aname="input_image"></a> [image](#input\_image)| The image used to start a container |`string`|`""`| no |
153
+
| <aname="input_interactive"></a> [interactive](#input\_interactive)| When this parameter is true, this allows you to deploy containerized applications that require stdin or a tty to be allocated |`bool`|`false`| no |
154
+
| <aname="input_ipc_mode"></a> [ipc\_mode](#input\_ipc\_mode)| The IPC resource namespace to use for the containers in the task |`any`|`null`| no |
155
+
| <aname="input_links"></a> [links](#input\_links)| The link parameter allows containers to communicate with each other without the need for port mappings |`list(string)`|`[]`| no |
156
+
| <aname="input_linuxParameters"></a> [linuxParameters](#input\_linuxParameters)| Linux-specific modifications that are applied to the container, such as Linux KernelCapabilities |`any`|`{}`| no |
157
+
| <aname="input_logConfiguration"></a> [logConfiguration](#input\_logConfiguration)| The log configuration specification for the container |`any`|`{}`| no |
158
+
| <aname="input_memory"></a> [memory](#input\_memory)| The hard limit (in MiB) of memory to present to the container |`number`|`512`| no |
159
+
| <aname="input_memoryReservation"></a> [memoryReservation](#input\_memoryReservation)| The soft limit (in MiB) of memory to reserve for the container |`number`|`0`| no |
160
+
| <aname="input_mountPoints"></a> [mountPoints](#input\_mountPoints)| The mount points for data volumes in your container |`list(any)`|`[]`| no |
161
+
| <aname="input_name"></a> [name](#input\_name)| The name of a container |`string`|`""`| no |
162
+
| <aname="input_network_mode"></a> [network\_mode](#input\_network\_mode)| The Docker networking mode to use for the containers in the task |`string`|`"bridge"`| no |
163
+
| <aname="input_pid_mode"></a> [pid\_mode](#input\_pid\_mode)| The process namespace to use for the containers in the task |`any`|`null`| no |
164
+
| <aname="input_placement_constraints"></a> [placement\_constraints](#input\_placement\_constraints)| An array of placement constraint objects to use for the task | <pre>list(object({<br> type = string<br> expression = string<br> }))</pre> |`[]`| no |
165
+
| <aname="input_portMappings"></a> [portMappings](#input\_portMappings)| The list of port mappings for the container |`list(any)`|`[]`| no |
166
+
| <aname="input_privileged"></a> [privileged](#input\_privileged)| When this parameter is true, the container is given elevated privileges on the host container instance (similar to the root user) |`bool`|`false`| no |
167
+
| <aname="input_pseudoTerminal"></a> [pseudoTerminal](#input\_pseudoTerminal)| When this parameter is true, a TTY is allocated |`bool`|`false`| no |
168
+
| <aname="input_readonlyRootFilesystem"></a> [readonlyRootFilesystem](#input\_readonlyRootFilesystem)| When this parameter is true, the container is given read-only access to its root file system |`bool`|`false`| no |
169
+
| <aname="input_register_task_definition"></a> [register\_task\_definition](#input\_register\_task\_definition)| Registers a new task definition from the supplied family and containerDefinitions |`bool`|`true`| no |
170
+
| <aname="input_repositoryCredentials"></a> [repositoryCredentials](#input\_repositoryCredentials)| The private repository authentication credentials to use |`map(string)`|`{}`| no |
171
+
| <aname="input_requires_compatibilities"></a> [requires\_compatibilities](#input\_requires\_compatibilities)| The launch type required by the task |`list(string)`|`[]`| no |
172
+
| <aname="input_resourceRequirements"></a> [resourceRequirements](#input\_resourceRequirements)| The type and amount of a resource to assign to a container |`list(string)`|`[]`| no |
173
+
| <aname="input_secrets"></a> [secrets](#input\_secrets)| The secrets to pass to the container |`list(map(string))`|`[]`| no |
174
+
| <aname="input_systemControls"></a> [systemControls](#input\_systemControls)| A list of namespaced kernel parameters to set in the container |`list(string)`|`[]`| no |
175
+
| <aname="input_tags"></a> [tags](#input\_tags)| The metadata that you apply to the task definition to help you categorize and organize them |`map(string)`|`{}`| no |
176
+
| <aname="input_taskCpu"></a> [taskCpu](#input\_taskCpu)| The number of cpu units limited for the task. Required for Fargate. _null_ to disable |`number`|`256`| no |
177
+
| <aname="input_taskMemory"></a> [taskMemory](#input\_taskMemory)| Memory (in MiB) for the task. Required for Fargate. _null_ to disable |`number`|`256`| no |
178
+
| <aname="input_task_role_arn"></a> [task\_role\_arn](#input\_task\_role\_arn)| The short name or full Amazon Resource Name (ARN) of the IAM role that containers in this task can assume |`string`|`""`| no |
179
+
| <aname="input_ulimits"></a> [ulimits](#input\_ulimits)| A list of ulimits to set in the container |`list(any)`|`[]`| no |
180
+
| <aname="input_user"></a> [user](#input\_user)| The user name to use inside the container |`string`|`""`| no |
181
+
| <aname="input_volumes"></a> [volumes](#input\_volumes)| A list of volume definitions in JSON format that containers in your task may use |`list(any)`|`[]`| no |
182
+
| <aname="input_volumesFrom"></a> [volumesFrom](#input\_volumesFrom)| Data volumes to mount from another container | <pre>list(object({<br> readOnly = bool<br> sourceContainer = string<br> }))</pre> |`[]`| no |
183
+
| <aname="input_workingDirectory"></a> [workingDirectory](#input\_workingDirectory)| The working directory in which to run commands inside the container |`string`|`""`| no |
165
184
166
185
## Outputs
167
186
168
187
| Name | Description |
169
188
|------|-------------|
170
-
| arn | The full Amazon Resource Name (ARN) of the task definition |
171
-
| container\_definitions | A list of container definitions in JSON format that describe the different containers that make up your task |
172
-
| family | The family of your task definition, used as the definition name |
173
-
| revision | The revision of the task in a particular family |
174
-
189
+
| <aname="output_arn"></a> [arn](#output\_arn)| The full Amazon Resource Name (ARN) of the task definition |
190
+
| <aname="output_container_definitions"></a> [container\_definitions](#output\_container\_definitions)| A list of container definitions in JSON format that describe the different containers that make up your task |
191
+
| <aname="output_family"></a> [family](#output\_family)| The family of your task definition, used as the definition name |
192
+
| <aname="output_revision"></a> [revision](#output\_revision)| The revision of the task in a particular family |
**Note:** The `register_task_definition` flag for both task definitions is required; otherwise a task definition containing a single container definition is registered created for both the `wordpress` and `mysql` services.
116
116
117
117
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
118
+
## Requirements
119
+
120
+
No requirements.
121
+
118
122
## Providers
119
123
120
-
No provider.
124
+
No providers.
125
+
126
+
## Modules
127
+
128
+
No modules.
129
+
130
+
## Resources
131
+
132
+
No resources.
121
133
122
134
## Inputs
123
135
124
136
| Name | Description | Type | Default | Required |
125
-
|------|-------------|------|---------|:-----:|
126
-
| container\_definitions | A list of container definitions in JSON format that describe the different containers that make up your task |`list`|`[]`| no |
|<aname="input_container_definitions"></a> [container\_definitions](#input\_container\_definitions)| A list of container definitions in JSON format that describe the different containers that make up your task |`list`|`[]`| no |
127
139
128
140
## Outputs
129
141
130
142
| Name | Description |
131
143
|------|-------------|
132
-
| container\_definitions | A list of container definitions in JSON format that describe the different containers that make up your task |
133
-
144
+
| <aname="output_container_definitions"></a> [container\_definitions](#output\_container\_definitions)| A list of container definitions in JSON format that describe the different containers that make up your task |
0 commit comments