turbot/aws_insights

Query: vpc_subnets_for_dax_cluster

Usage

powerpipe query aws_insights.query.vpc_subnets_for_dax_cluster

SQL

with cluster_details as (
select
subnet_group
from
aws_dax_cluster
where
arn = $1
and account_id = split_part($1, ':', 5)
and region = split_part($1, ':', 4)
),
subnet_group_details as (
select
jsonb_array_elements(g.subnets) ->> 'SubnetIdentifier' as subnet_id
from
aws_dax_subnet_group g
join
cluster_details c on g.subnet_group_name = c.subnet_group
where
g.account_id = split_part($1, ':', 5)
and g.region = split_part($1, ':', 4)
)
select
subnet_id
from
subnet_group_details;