turbot/aws_insights

Query: elasticache_node_groups_for_elasticache_cluster_node

Usage

powerpipe query aws_insights.query.elasticache_node_groups_for_elasticache_cluster_node

SQL

select
rg.title || '-' || (ng ->> 'NodeGroupId') as elasticache_node_group_id
from
aws_elasticache_cluster as c,
aws_elasticache_replication_group rg,
jsonb_array_elements(node_groups) ng,
jsonb_array_elements(ng -> 'NodeGroupMembers') ngm
where
c.cache_cluster_id = ngm ->> 'CacheClusterId'
and c.arn = $1
and c.account_id = split_part($1, ':', 5)
and c.region = split_part($1, ':', 4);