Repository files navigation Terraform ECS Task Definition Module
No modules.
Name
Description
Type
Default
Required
container_definitions
A list of valid container definitions provided as a single valid JSON document.
string
n/a
yes
name
A unique name for your task definition.
string
n/a
yes
network_mode
(Optional) Docker networking mode to use for the containers in the task. Valid values are none, bridge, awsvpc, and host.
string
"awsvpc"
no
placement_constraints
(Optional) Configuration block for rules that are taken into consideration during task placement. Maximum number of placement_constraints is 10. This is a list of maps, where each map should contain "type" and "expression".
list(any)
[]
no
proxy_configuration
(Optional) Configuration block for the App Mesh proxy.
list(any)
[]
no
requires_compatibilities
Set of launch types required by the task. The valid values are EC2 and FARGATE.
list(string)
[ "FARGATE" ]
no
tags
(Optional) Key-value map of resource tags.
map(string)
{}
no
task_cpu
(Optional) Number of cpu units used by the task. If the requires_compatibilities is FARGATE this field is required.
number
null
no
task_execution_role
(Optional) ARN of the task execution role that the Amazon ECS container agent and the Docker daemon can assume.
string
null
no
task_memory
(Optional) Amount (in MiB) of memory used by the task. If the requires_compatibilities is FARGATE this field is required.
number
null
no
task_role_arn
(Optional) ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services.
string
null
no
volumes
(Optional) Configuration block for volumes that containers in your task may use.
list(object({ host_path = optional(string) name = string docker_volume_configuration = optional(object({ autoprovision = bool driver = string driver_opts = map(string) labels = map(string) scope = string })) efs_volume_configuration = optional(object({ file_system_id = string root_directory = optional(string) transit_encryption = optional(string) transit_encryption_port = optional(string) authorization_config = optional(object({ access_point_id = optional(string) iam = optional(string) })) })) }))
[]
no
Name
Description
output
Task definition attributes
You can’t perform that action at this time.