FEATURES OPEN SOURCE ABOUT DOCS LOGIN REGISTER

aws_ecs_task_definition

Provides an ECS task definition to be used in aws_ecs_service.

Example Usage

resource "aws_ecs_task_definition" "jenkins" {
  family = "jenkins"
  container_definitions = "${file("task-definitions/jenkins.json")}"

  volume {
    name = "jenkins-home"
    host_path = "/ecs/jenkins-home"
  }
}

task-definitions/jenkins.json

The below would be passed into the container_definitions attribute. This is a small subset of the available parameters, see the AWS docs for a full list.

[
  {
    "name": "jenkins",
    "image": "jenkins",
    "cpu": 10,
    "memory": 500,
    "essential": true,
    "portMappings": [
      {
        "containerPort": 80,
        "hostPort": 80
      }
    ]
  }
]

Argument Reference

The following arguments are supported:

Volumes support the following:

Attributes Reference

The following attributes are exported:


See the source of this document at Terraform.io