turbot/azure_insights

Query: key_vault_keys_for_compute_disk

Usage

powerpipe query azure_insights.query.key_vault_keys_for_compute_disk

SQL

select
lower(k.id) as key_vault_key_id,
lower(v.key_uri_with_version) as key_uri_with_version
from
azure_compute_disk_encryption_set as e
left join azure_compute_disk as d on lower(d.encryption_disk_encryption_set_id) = lower(e.id)
left join azure_key_vault_key_version as v on lower(e.active_key_url) = lower(v.key_uri_with_version)
left join azure_key_vault_key as k on lower(k.key_uri) = lower(v.key_uri)
where
lower(d.id) = $1
and d.subscription_id = split_part($1, '/', 3);