turbot/aws_insights

Query: vpc_security_groups_for_elasticache_cluster_node

Usage

powerpipe query aws_insights.query.vpc_security_groups_for_elasticache_cluster_node

SQL

select
group_id as vpc_security_group_id
from
aws_vpc_security_group
where
group_id in
(
select
sg ->> 'SecurityGroupId'
from
aws_elasticache_cluster,
jsonb_array_elements(security_groups) as sg
where
arn = $1
and account_id = split_part($1, ':', 5)
and region = split_part($1, ':', 4)
);