turbot/aws_insights

Query: vpc_subnets_for_rds_db_cluster

Usage

powerpipe query aws_insights.query.vpc_subnets_for_rds_db_cluster

SQL

select
vs ->> 'SubnetIdentifier' as subnet_id
from
aws_rds_db_cluster as rdc
left join
aws_rds_db_subnet_group as rdsg
on rdc.db_subnet_group = rdsg.name
and rdc.region = rdsg.region
and rdc.account_id = rdsg.account_id
cross join
jsonb_array_elements(rdsg.subnets) as vs
where
rdc.arn = $1;