turbot/alicloud_insights

Query: kms_secrets_for_kms_key

Usage

powerpipe query alicloud_insights.query.kms_secrets_for_kms_key

SQL

select
s.arn as secret_arn
from
alicloud_kms_secret as s
left join alicloud_kms_key k
on s.encryption_key_id = k.key_id
where
k.arn = $1
and k.account_id = split_part($1,':',4)
and k.region = split_part($1,':',3)
and s.arn is not null;