Requirements

Name Version
terraform >= 0.12

Providers

Name Version
aws n/a

Inputs

Name Description Type Default Required
command The command that is passed to the container list(string) [] no
container_cpu The number of cpu units to reserve for the container. This is optional for tasks using Fargate launch type and the total amount of container_cpu of all containers in a task will need to be lower than the task-level cpu value number 300 no
container_image n/a string n/a yes
container_memory The amount of memory (in MiB) to allow the container to use. This is a hard limit, if the container attempts to exceed the container_memory, the container is killed. This field is optional for Fargate launch type and the total amount of container_memory of all containers in a task will need to be lower than the task memory value number 256 no
container_memory_reservation The amount of memory (in MiB) to reserve for the container. If container needs to exceed this threshold, it can do so up to the set container_memory hard limit number 128 no
dns_servers Container DNS servers. This is a list of strings specifying the IP addresses of the DNS servers list(string) [] no
docker_labels The configuration options to send to the docker_labels map(string) {} no
entrypoint The entry point that is passed to the container list(string) [] no
environment The environment variables to pass to the container. This is a list of maps
list(object(
{
name = string
value = string
}
))
[] no
essential Determines whether all other containers in a task are stopped, if this container fails or stops for any reason. Due to how Terraform type casts booleans in json it is required to double quote this value bool true no
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 null no
identifier The name for the cluster string n/a yes
links List of container names this container can communicate with without port mappings list(string) [] no
log_configuration The log configuration for the container
object({
logDriver = string,
options = map(string)
})
{
“logDriver”: “json-file”,
“options”: {}
}
no
mount_points Container mount points. This is a list of maps, where each map should contain a containerPath and sourceVolume
list(object(
{
containerPath = string
sourceVolume = string
}
))
[] no
port_mappings The port mappings to configure for the container. This is a list of maps. Each map should contain “containerPort”, “hostPort”, and “protocol”, where “protocol” is one of “tcp” or “udp”. If using containers in a task with the awsvpc or host network mode, the hostPort can either be left blank or set to the same value as the containerPort
list(object(
{
containerPort = number
hostPort = number
protocol = string
}
))
[] no
readonly_root_filesystem Determines whether a container is given read-only access to its root filesystem. Due to how Terraform type casts booleans in json it is required to double quote this value bool false no
secrets The secrets to pass to the container. This is a list of maps
list(object(
{
name = string
valueFrom = string
}
))
[] no
start_timeout Time duration (in seconds) to wait before giving up on resolving dependencies for a container number 30 no
stop_timeout Time duration (in seconds) to wait before the container is forcefully killed if it doesn’t exit normally on its own number 30 no
system_controls A list of namespaced kernel parameters to set in the container, mapping to the –sysctl option to docker run. This is a list of maps: { namespace = “”, value = “”} list(map(string)) [] no
tags Tags to be applied to the resource map {} no
task_role_arn The ARN of IAM role that allows your Amazon ECS container task to make calls to other AWS services string null no
ulimits Container ulimit settings. This is a list of maps, where each map should contain “name”, “hardLimit” and “softLimit”
list(object(
{
name = string
hardLimit = number
softLimit = number
}
))
[] no
volumes_from A list of VolumesFrom maps which contain “sourceContainer” (name of the container that has the volumes to mount) and “readOnly” (whether the container can write to the volume)
list(object(
{
sourceContainer = string
readOnly = bool
}
))
[] no

Outputs

Name Description
output n/a