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
Refactored container definitions out of module (#69)
* Refactored container definitions out of module
* Turn cloudwatch logging optional
Reason: if the creation of cloudwatch logs happens outside of this module, then that can be passed into the container definitions variable
* chore: Update documentation
* Turn cloudwatch logging optional
* Turn cloudwatch logging optional - fix
Despite turning cloudwatch group resource as optional, the module will still expect a log group arn
* Lint fixes
* Remove square brackets as input is a list
* Revert container name to original
* Comment about 'target_type' for Fargate
* Update target group health check parameters
* Documentation update
| <aname="input_capacity_provider_strategy"></a> [capacity\_provider\_strategy](#input\_capacity\_provider\_strategy)| (Optional) The capacity\_provider\_strategy configuration block. This is a list of maps, where each map should contain "capacity\_provider ", "weight" and "base" |`list(any)`|`[]`| no |
132
132
| <aname="input_cluster_id"></a> [cluster\_id](#input\_cluster\_id)| The Amazon Resource Name (ARN) that identifies the cluster. |`string`| n/a | yes |
133
+
| <aname="input_container_definitions"></a> [container\_definitions](#input\_container\_definitions)| A string containing json encoded array of container definitions for Task Definition |`string`|`null`| no |
133
134
| <aname="input_container_name"></a> [container\_name](#input\_container\_name)| Optional name for the container to be used instead of name\_prefix. |`string`|`""`| no |
134
135
| <aname="input_cpu_architecture"></a> [cpu\_architecture](#input\_cpu\_architecture)| cpu architecture for the task |`string`|`"X86_64"`| no |
135
136
| <aname="input_create_repository_credentials_iam_policy"></a> [create\_repository\_credentials\_iam\_policy](#input\_create\_repository\_credentials\_iam\_policy)| Set to true if you are specifying `repository_credentials` variable, it will attach IAM policy with necessary permissions to task role. |`bool`|`false`| no |
137
+
| <aname="input_deny_egress_to_anywhere"></a> [deny\_egress\_to\_anywhere](#input\_deny\_egress\_to\_anywhere)| When this parameter is true, no default egress rule will be created |`bool`|`false`| no |
136
138
| <aname="input_deployment_controller_type"></a> [deployment\_controller\_type](#input\_deployment\_controller\_type)| Type of deployment controller. Valid values: CODE\_DEPLOY, ECS, EXTERNAL. Default: ECS. |`string`|`"ECS"`| no |
137
139
| <aname="input_deployment_maximum_percent"></a> [deployment\_maximum\_percent](#input\_deployment\_maximum\_percent)| The upper limit of the number of running tasks that can be running in a service during a deployment |`number`|`200`| no |
138
140
| <aname="input_deployment_minimum_healthy_percent"></a> [deployment\_minimum\_healthy\_percent](#input\_deployment\_minimum\_healthy\_percent)| The lower limit of the number of running tasks that must remain running and healthy in a service during a deployment |`number`|`50`| no |
@@ -141,10 +143,12 @@ No modules.
141
143
| <aname="input_enable_deployment_circuit_breaker_rollback"></a> [enable\_deployment\_circuit\_breaker\_rollback](#input\_enable\_deployment\_circuit\_breaker\_rollback)| Whether to enable Amazon ECS to roll back the service if a service deployment fails. If rollback is enabled, when a service deployment fails, the service is rolled back to the last deployment that completed successfully. |`bool`|`"false"`| no |
142
144
| <aname="input_enable_ecs_managed_tags"></a> [enable\_ecs\_managed\_tags](#input\_enable\_ecs\_managed\_tags)| Specifies whether to enable Amazon ECS managed tags for the tasks within the service |`bool`|`true`| no |
143
145
| <aname="input_enable_execute_command"></a> [enable\_execute\_command](#input\_enable\_execute\_command)| Specifies whether to enable Amazon ECS Exec for the tasks within the service. |`bool`|`true`| no |
146
+
| <aname="input_enable_logs"></a> [enable\_logs](#input\_enable\_logs)| Turn cloudwatch logging optional |`bool`|`true`| no |
144
147
| <aname="input_force_new_deployment"></a> [force\_new\_deployment](#input\_force\_new\_deployment)| Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g. myimage:latest), roll Fargate tasks onto a newer platform version. |`bool`|`false`| no |
145
-
| <aname="input_health_check"></a> [health\_check](#input\_health\_check)| A health block containing health check settings for the target group. Overrides the defaults. |`map(string)`|n/a|yes|
148
+
| <aname="input_health_check"></a> [health\_check](#input\_health\_check)| A health block containing health check settings for the target group. Overrides the defaults. |`map(string)`|`{}`|no|
146
149
| <aname="input_health_check_grace_period_seconds"></a> [health\_check\_grace\_period\_seconds](#input\_health\_check\_grace\_period\_seconds)| Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 7200. Only valid for services configured to use load balancers. |`number`|`300`| no |
147
150
| <aname="input_load_balanced"></a> [load\_balanced](#input\_load\_balanced)| Whether the task should be loadbalanced. |`bool`|`true`| no |
151
+
| <aname="input_log_groups_arn"></a> [log\_groups\_arn](#input\_log\_groups\_arn)| List of CloudWatch Group ARNs to use when enable\_logs is set to false |`list(string)`|`[]`| no |
148
152
| <aname="input_log_retention_in_days"></a> [log\_retention\_in\_days](#input\_log\_retention\_in\_days)| Number of days the logs will be retained in CloudWatch. |`number`|`30`| no |
149
153
| <aname="input_logs_kms_key"></a> [logs\_kms\_key](#input\_logs\_kms\_key)| The KMS key ARN to use to encrypt container logs. |`string`|`""`| no |
150
154
| <aname="input_name_prefix"></a> [name\_prefix](#input\_name\_prefix)| A prefix used for naming resources. |`string`| n/a | yes |
@@ -167,10 +171,10 @@ No modules.
167
171
| <aname="input_task_container_entrypoint"></a> [task\_container\_entrypoint](#input\_task\_container\_entrypoint)| The entrypoint that is passed to the container. |`list(string)`|`[]`| no |
168
172
| <aname="input_task_container_environment"></a> [task\_container\_environment](#input\_task\_container\_environment)| The environment variables to pass to a container. |`map(string)`|`{}`| no |
169
173
| <aname="input_task_container_environment_files"></a> [task\_container\_environment\_files](#input\_task\_container\_environment\_files)| The environment variable files (s3 object arns) to pass to a container. Files must use .env file extension. |`list(string)`|`[]`| no |
170
-
| <aname="input_task_container_image"></a> [task\_container\_image](#input\_task\_container\_image)| The image used to start a container. |`string`|n/a|yes|
174
+
| <aname="input_task_container_image"></a> [task\_container\_image](#input\_task\_container\_image)| The image used to start a container. |`string`|`"marcincuber/2048-game:latest"`|no|
171
175
| <aname="input_task_container_memory"></a> [task\_container\_memory](#input\_task\_container\_memory)| The hard limit (in MiB) of memory for the container. |`number`|`null`| no |
172
176
| <aname="input_task_container_memory_reservation"></a> [task\_container\_memory\_reservation](#input\_task\_container\_memory\_reservation)| The soft limit (in MiB) of memory to reserve for the container. |`number`|`null`| no |
173
-
| <aname="input_task_container_port"></a> [task\_container\_port](#input\_task\_container\_port)| The port number on the container that is bound to the user-specified or automatically assigned host port |`number`|n/a|yes|
177
+
| <aname="input_task_container_port"></a> [task\_container\_port](#input\_task\_container\_port)| The port number on the container that is bound to the user-specified or automatically assigned host port |`number`|`80`|no|
174
178
| <aname="input_task_container_protocol"></a> [task\_container\_protocol](#input\_task\_container\_protocol)| Protocol that the container exposes. |`string`|`"HTTP"`| no |
175
179
| <aname="input_task_container_secrets"></a> [task\_container\_secrets](#input\_task\_container\_secrets)| The secrets variables to pass to a container. |`list(map(string))`|`null`| no |
176
180
| <aname="input_task_container_working_directory"></a> [task\_container\_working\_directory](#input\_task\_container\_working\_directory)| The working directory to run commands inside the container. |`string`|`""`| no |
@@ -179,15 +183,14 @@ No modules.
179
183
| <aname="input_task_definition_memory"></a> [task\_definition\_memory](#input\_task\_definition\_memory)| The soft limit (in MiB) of memory to reserve for the task. |`number`|`512`| no |
180
184
| <aname="input_task_health_check"></a> [task\_health\_check](#input\_task\_health\_check)| An optional healthcheck definition for the task |`map(number)`|`null`| no |
181
185
| <aname="input_task_health_command"></a> [task\_health\_command](#input\_task\_health\_command)| A string array representing the command that the container runs to determine if it is healthy. |`list(string)`|`null`| no |
182
-
| <aname="input_task_host_port"></a> [task\_host\_port](#input\_task\_host\_port)| The port number on the container instance to reserve for your container. |`number`|`0`| no |
186
+
| <aname="input_task_host_port"></a> [task\_host\_port](#input\_task\_host\_port)| The port number on the container instance to reserve for your container. |`number`|`80`| no |
183
187
| <aname="input_task_mount_points"></a> [task\_mount\_points](#input\_task\_mount\_points)| The mount points for data volumes in your container. Each object inside the list requires "sourceVolume", "containerPath" and "readOnly". For more information see https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html|`list(object({ sourceVolume = string, containerPath = string, readOnly = bool }))`|`null`| no |
184
188
| <aname="input_task_pseudo_terminal"></a> [task\_pseudo\_terminal](#input\_task\_pseudo\_terminal)| Allocate TTY in the container |`bool`|`null`| no |
185
189
| <aname="input_task_start_timeout"></a> [task\_start\_timeout](#input\_task\_start\_timeout)| Time duration (in seconds) to wait before giving up on resolving dependencies for a container. If this parameter is not specified, the default value of 3 minutes is used (fargate). |`number`|`null`| no |
186
190
| <aname="input_task_stop_timeout"></a> [task\_stop\_timeout](#input\_task\_stop\_timeout)| Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own. The max stop timeout value is 120 seconds and if the parameter is not specified, the default value of 30 seconds is used. |`number`|`null`| no |
187
191
| <aname="input_volume"></a> [volume](#input\_volume)| (Optional) A set of volume blocks that containers in your task may use. This is a list of maps, where each map should contain "name", "host\_path", "docker\_volume\_configuration" and "efs\_volume\_configuration". Full set of options can be found at https://www.terraform.io/docs/providers/aws/r/ecs_task_definition.html|`list(any)`|`[]`| no |
| <aname="input_wait_for_steady_state"></a> [wait\_for\_steady\_state](#input\_wait\_for\_steady\_state)| If true, Terraform will wait for the service to reach a steady state (like aws ecs wait services-stable) before continuing. |`bool`|`false`| no |
190
-
| <aname="deny_egress_to_anywhere"></a> [deny\_egress\_to\_anywhere](#deny\_egress\_to\_anywhere)| If true, Terraform will no create the default egress rule which allows all outgoing traffic. |`bool`|`false`| no |
191
194
192
195
## Outputs
193
196
@@ -202,6 +205,7 @@ No modules.
202
205
| <aname="output_target_group_arn"></a> [target\_group\_arn](#output\_target\_group\_arn)| The ARN of the Target Group used by Load Balancer. |
203
206
| <aname="output_target_group_name"></a> [target\_group\_name](#output\_target\_group\_name)| The Name of the Target Group used by Load Balancer. |
204
207
| <aname="output_task_definition_arn"></a> [task\_definition\_arn](#output\_task\_definition\_arn)| The Amazon Resource Name (ARN) of the task definition created |
208
+
| <aname="output_task_definition_container_definitions"></a> [task\_definition\_container\_definitions](#output\_task\_definition\_container\_definitions)| A list of container definitions |
205
209
| <aname="output_task_definition_name"></a> [task\_definition\_name](#output\_task\_definition\_name)| The name of the task definition created |
206
210
| <aname="output_task_role_arn"></a> [task\_role\_arn](#output\_task\_role\_arn)| The Amazon Resource Name (ARN) specifying the ECS service role. |
207
211
| <aname="output_task_role_name"></a> [task\_role\_name](#output\_task\_role\_name)| The name of the Fargate task service role. |
0 commit comments