turbot/aws_insights

Query: kms_keys_for_codepipeline_pipeline

Usage

powerpipe query aws_insights.query.kms_keys_for_codepipeline_pipeline

SQL

select
k.arn as kms_key_arn
from
aws_codepipeline_pipeline as p,
aws_kms_key as k,
jsonb_array_elements(aliases) as a
where
a ->> 'AliasArn' = p.encryption_key ->> 'Id'
and p.arn = $1
and p.region = split_part($1, ':', 4)
and p.account_id = split_part($1, ':', 5);