turbot/aws_insights

Query: vpc_security_groups_for_eks_cluster

Usage

powerpipe query aws_insights.query.vpc_security_groups_for_eks_cluster

SQL

select
group_id as vpc_security_group_id
from
aws_vpc_security_group
where
group_id in
(
select
s
from
aws_eks_cluster,
jsonb_array_elements_text(resources_vpc_config -> 'SecurityGroupIds') as s
where
arn = $1
and account_id = split_part($1, ':', 5)
and region = split_part($1, ':', 4)
)