Skip to content

mergermarket/terraform-acuris-task-definition-with-task-role

Repository files navigation

terraform-acuris-task-definition-with-task-role

Test

## Usage Creates a task definition for an ECS service, with an IAM role for the task associated.

module "taskdef" {
    source = "github.com/mergermarket/tf_ecs_taskdef_with_task_role"

    family                = "live-service-name"
    container_definitions = [
        <<END
{
    ...container definition...
}
        END
    ]

    policy = <<END
{
    ...<IAM Policy>...
}
END

    volume = {
        name = 'data'
        host_path = '/mnt/data'
    }
    placement_constraint_on_demand_only = true

## API

Parameters

Outputs

  • arn - the ARN of the task definition.
  • task_role_arn - the ARN of the Role for this task definition.