Data Source: aws_ecs_task_execution

Terraform data source for managing an AWS ECS (Elastic Container) Task Execution. This data source calls the RunTask API, allowing execution of one-time tasks that don't fit a standard resource lifecycle. See the feature request issue for additional context.

Example Usage

Basic Usage

data "aws_ecs_task_execution" "example" {
  cluster         = aws_ecs_cluster.example.id
  task_definition = aws_ecs_task_definition.example.arn
  desired_count   = 1
  launch_type     = "FARGATE"

  network_configuration {
    subnets          = aws_subnet.example[*].id
    security_groups  = [aws_security_group.example.id]
    assign_public_ip = false
  }
}

Argument Reference

The following arguments are required:

The following arguments are optional:

capacity_provider_strategy

network_configuration

For more information, see the Task Networking documentation.

overrides

container_overrides

environment

resource_requirements

inference_accelerator_overrides

placement_constraints

placement_strategy

For more information, see the Placement Strategy documentation.

Attribute Reference

This data source exports the following attributes in addition to the arguments above: