Terraform module for creating an AWS ECS Task Definition.
Name | Description | Type | Default | Required |
---|---|---|---|---|
additional_execute_role_policies | Additional policy ARNs to attach to the execution role. | list(string) |
[] |
no |
additional_task_role_policies | Additional policy ARNs to attach to the task role. | list(string) |
[] |
no |
container_definitions | A list of valid container definitions provided as a valid HCL object list. | any |
n/a | yes |
cpu | Number of CPU units used by the task. | number |
1024 |
no |
cpu_architecture | CPU architecture required by the task. | string |
"X86_64" |
no |
create_execution_role | If enabled, will create an execution role and attach the AmazonECSTaskExecutionRolePolicy to it. | bool |
true |
no |
create_task_role | If enabled, will create a task role. | bool |
true |
no |
enable_execute_command | If enabled, will add the AmazonSSMManagedInstanceCore to the task role. | bool |
true |
no |
ephemeral_storage_size_in_gib | The amount of ephemeral storage (in GiB) to allocate to the task. | number |
20 |
no |
execution_role_arn | Execution role ARN to attach to the task. | string |
null |
no |
execution_role_name | Name of the execution role to create. | string |
null |
no |
execution_role_name_prefix | Whether to prefix the execution role name with the family name. | bool |
false |
no |
inference_accelerators | List of Elastic Inference accelerators associated with the task. | list(object({ |
[] |
no |
memory | Amount (in MiB) of memory used by the task. | number |
2048 |
no |
name | Family of the task definition. | string |
n/a | yes |
network_mode | The network mode to use for the containers in the task. The valid values are bridge, host, awsvpc, and none. If no network mode is specified, the default is bridge. | string |
"awsvpc" |
no |
operating_system_family | OS family required by the task. | string |
"LINUX" |
no |
proxy_configuration | Configuration details for an App Mesh proxy. | object({ |
null |
no |
requires_compatibilities | The launch type on which to run your service. The valid values are EC2 and FARGATE. | list(string) |
[ |
no |
tags | Tags to add to the created resources. | map(any) |
{} |
no |
task_role_arn | Task role ARN to attach to the task. | string |
null |
no |
task_role_name | Name of the task role to create. | string |
null |
no |
task_role_name_prefix | Whether to prefix the task role name with the family name. | bool |
false |
no |
volumes | A list of volume definitions. | list(object({ |
[] |
no |
Name | Description |
---|---|
arn | The ARN of the task definition. |
execution_role_arn | The ARN of the IAM role that grants the Amazon ECS container agent permission to make calls to your Amazon ECS container task. |
execution_role_name | The name of the IAM role that grants the Amazon ECS container agent permission to make calls to your Amazon ECS container task. |
task_role_arn | The ARN of the IAM role that allows your Amazon ECS container task to make calls to other AWS services. |
task_role_name | The name of the IAM role that allows your Amazon ECS container task to make calls to other AWS services. |
Name | Version |
---|---|
aws | >= 4.36 |
- resource.aws_ecs_task_definition.main (main.tf#6)
- resource.aws_iam_role_policy_attachment.execute_additional (main.tf#113)
- resource.aws_iam_role_policy_attachment.execute_command (main.tf#139)
- resource.aws_iam_role_policy_attachment.task_additional (main.tf#132)