turbot/aws_insights

Query: efs_file_systems_for_ecs_task_definition

Usage

powerpipe query aws_insights.query.efs_file_systems_for_ecs_task_definition

SQL

select
f.arn as file_system_arn
from
aws_ecs_task_definition as td,
jsonb_array_elements(volumes) as v
left join aws_efs_file_system as f on f.file_system_id = v -> 'EfsVolumeConfiguration' ->> 'FileSystemId'
where
td.task_definition_arn = $1
and td.account_id = split_part($1, ':', 5)
and td.region = split_part($1, ':', 4);