turbot/gcp_insights

Query: compute_snapshots_for_kms_key

Usage

powerpipe query gcp_insights.query.compute_snapshots_for_kms_key

SQL

select
s.name as snapshot_name
from
gcp_compute_snapshot s,
gcp_kms_key_version v
where
v.crypto_key_version::text = split_part(s.kms_key_name, 'cryptoKeyVersions/', 2)
and split_part(s.kms_key_name, '/', 8) = v.key_name
and v.self_link like $1 || '%';