aws::ecs-task

Create an ECS Task.

Example

aws::ecs-task task
    cluster: $(external-query aws::ecs-cluster {name: "example-ecs-task"})
    count: 1
    group: "example-group"
    launch-type: ECS
    reference-id: "example-ecs-task-reference"
    started-by: "example-user"
    task-definition: $(external-query aws::ecs-task-definition { family: 'test-ec2-task-definition', revision: 4 })
end

Attributes

Attribute Description
capacity-provider-strategy-item list The capacity provider strategy to use for the task. Cannot be set if launch-type is set.
cluster The cluster on which to run your task. (Required)
count The number of instantiations of the specified task to place on your cluster. (Required)
enable-ecs-managed-tags Enable or disable Amazon ECS managed tags for the tasks within the task. Cannot be set if capacity-provider-strategy-item is set.
group The name of the task group to associate with the task.
launch-type The launch type on which to run your task. Cannot be set if capacity-provider-strategy-item is set.
network-configuration The network configuration for the task.
placement-constraints list The placement constraints to use for task. Maximum allowed items are 10.
placement-strategy list The placement strategies to use for your task. Maximum allowed items are 5.
propagate-tags The option to propagate the tags from the task definition or the service to the tasks in the service. Valid values are TASK_DEFINITION or SERVICE.
reference-id The reference ID to use for the task.
started-by An optional tag specified when a task is started.
tags map The tags to apply to the task.
task-definition The task definition to run in your task.

Outputs

Attribute Description
arn The Amazon Resource Number (ARN) of the task.