Skip to content

Data Source: awsEcsContainerDefinition

The ECS container definition data source allows access to details of a specific container within an AWS ECS service.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dataAwsEcsContainerDefinition.DataAwsEcsContainerDefinition(
  this,
  "ecs-mongo",
  {
    containerName: "mongodb",
    taskDefinition: "${aws_ecs_task_definition.mongo.id}",
  }
);

Argument Reference

The following arguments are supported:

  • taskDefinition - (Required) ARN of the task definition which contains the container
  • containerName - (Required) Name of the container definition

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • image - Docker image in use, including the digest
  • imageDigest - Digest of the docker image in use
  • cpu - CPU limit for this container definition
  • memory - Memory limit for this container definition
  • memoryReservation - Soft limit (in MiB) of memory to reserve for the container. When system memory is under contention, Docker attempts to keep the container memory to this soft limit
  • environment - Environment in use
  • disableNetworking - Indicator if networking is disabled
  • dockerLabels - Set docker labels