turbot/aws_insights

Query: ecs_task_definitions_for_ecr_repository

Usage

powerpipe query aws_insights.query.ecs_task_definitions_for_ecr_repository

SQL

select
t.task_definition_arn as task_definition_arn
from
aws_ecr_repository as r,
aws_ecs_task_definition as t,
jsonb_array_elements(container_definitions) as d
where
r.repository_uri = split_part(d ->> 'Image', ':', 1)
and r.arn = $1
and r.region = split_part($1, ':', 4)
and r.account_id = split_part($1, ':', 5);