turbot/aws_insights

Query: vpc_subnets_for_redshift_cluster

Usage

powerpipe query aws_insights.query.vpc_subnets_for_redshift_cluster

SQL

select
subnet ->> 'SubnetIdentifier' as subnet_id
from
aws_redshift_subnet_group s
join aws_redshift_cluster as c on c.cluster_subnet_group_name = s.cluster_subnet_group_name
and c.region = s.region
and c.account_id = s.account_id,
jsonb_array_elements(s.subnets) subnet
where
c.arn = $1;