The ECS Service data source allows access to details of a specific Service within a AWS ECS Cluster.
data "aws_ecs_service" "example" {
service_name = "example"
cluster_arn = data.aws_ecs_cluster.example.arn
}
This data source supports the following arguments:
service_name
- (Required) Name of the ECS Servicecluster_arn
- (Required) ARN of the ECS ClusterThis data source exports the following attributes in addition to the arguments above:
arn
- ARN of the ECS Servicedesired_count
- Number of tasks for the ECS Servicelaunch_type
- Launch type for the ECS Servicescheduling_strategy
- Scheduling strategy for the ECS Servicetask_definition
- Family for the latest ACTIVE revision or full ARN of the task definition.tags
- Resource tags.