turbot/alicloud_insights

Query: ecs_security_groups_for_rds_instance

Usage

powerpipe query alicloud_insights.query.ecs_security_groups_for_rds_instance

SQL

select
isg->>'SecurityGroupId' as security_group_id
from
alicloud_rds_instance as i,
jsonb_array_elements(i.security_group_configuration) as isg,
alicloud_ecs_security_group as sg
where
i.arn = $1
and i.account_id = split_part($1,':',5)
and i.region = split_part($1,':',4)
and isg->>'SecurityGroupId' = sg.security_group_id;