turbot/aws_insights

Query: vpc_subnets_for_eks_cluster

Usage

powerpipe query aws_insights.query.vpc_subnets_for_eks_cluster

SQL

select
subnet_id as vpc_subnet_id
from
aws_vpc_subnet
where
subnet_id in
(
select
s
from
aws_eks_cluster,
jsonb_array_elements_text(resources_vpc_config -> 'SubnetIds') as s
where
arn = $1
and account_id = split_part($1, ':', 5)
and region = split_part($1, ':', 4)
)