Skip to content

bryan-rhm/terraform-aws-ecs-task-definition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform ECS Task Definition Module

Requirements

Name Version
terraform >= 1.0.0
aws >= 3.43.0

Providers

Name Version
aws 3.70.0

Modules

No modules.

Resources

Name Type
aws_ecs_task_definition.this resource

Inputs

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

Outputs

Name Description
output Task definition attributes