turbot/aws_insights

Query: vpc_security_groups_for_ec2_instance

Usage

powerpipe query aws_insights.query.vpc_security_groups_for_ec2_instance

Steampipe Tables

SQL

select
sg ->> 'GroupId' as security_group_id
from
aws_ec2_instance as i,
jsonb_array_elements(security_groups) as sg
where
i.account_id = split_part($1, ':', 5)
and i.region = split_part($1, ':', 4)
and arn = $1;