turbot/aws_insights

Query: vpc_security_groups_for_codebuild_project

Usage

powerpipe query aws_insights.query.vpc_security_groups_for_codebuild_project

SQL

with sg_id as (
select
vpc_config -> 'SecurityGroupIds' as sg,
arn
from
aws_codebuild_project
where
account_id = split_part($1, ':', 5)
and region = split_part($1, ':', 4)
and arn = $1
)
select
s.group_id as vpc_security_group_id
from
sg_id as c,
aws_vpc_security_group as s
where
sg ?& array[s.group_id]
and c.arn = $1;