turbot/aws_insights

Query: vpc_vpcs_for_ecs_cluster

Usage

powerpipe query aws_insights.query.vpc_vpcs_for_ecs_cluster

SQL

select
v.vpc_id as vpc_id
from
aws_ecs_container_instance as i
right join aws_ec2_instance as c on c.instance_id = i.ec2_instance_id
right join aws_vpc_subnet as s on s.subnet_id = c.subnet_id
right join aws_vpc as v on v.vpc_id = s.vpc_id
where
v.vpc_id is not null
and i.cluster_arn = $1;