turbot/aws_insights

Query: vpc_vpcs_for_efs_file_system

Usage

powerpipe query aws_insights.query.vpc_vpcs_for_efs_file_system

SQL

with efs_mount_details as (
select
m.vpc_id
from
aws_efs_mount_target m
join
aws_efs_file_system f on f.file_system_id = m.file_system_id
where
f.arn = $1
and f.account_id = split_part($1, ':', 5)
and f.region = split_part($1, ':', 4)
)
select
v.vpc_id as vpc_id
from
aws_vpc v
join
efs_mount_details emd on emd.vpc_id = v.vpc_id;