The ECS container definition data source allows access to details of a specific container within an AWS ECS service.
data "aws_ecs_container_definition" "ecs-mongo" {
task_definition = aws_ecs_task_definition.mongo.id
container_name = "mongodb"
}
This data source supports the following arguments:
task_definition
- (Required) ARN of the task definition which contains the containercontainer_name
- (Required) Name of the container definitionThis data source exports the following attributes in addition to the arguments above:
image
- Docker image in use, including the digestimage_digest
- Digest of the docker image in usecpu
- CPU limit for this container definitionmemory
- Memory limit for this container definitionmemory_reservation
- 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 limitenvironment
- Environment in usedisable_networking
- Indicator if networking is disableddocker_labels
- Set docker labels