turbot/azure_insights

Query: key_vault_keys_for_storage_account

Usage

powerpipe query azure_insights.query.key_vault_keys_for_storage_account

SQL

select
lower(key.id) as key_id
from
azure_storage_account as a
left join azure_key_vault as k on a.encryption_key_vault_properties_key_vault_uri = trim(k.vault_uri, '/')
left join azure_key_vault_key_version as v on lower(v.key_uri_with_version) = lower(a.encryption_key_vault_properties_key_current_version_id)
left join azure_key_vault_key as key on lower(key.key_uri) = lower(v.key_uri)
where
key.id is not null
and lower(a.id) = $1;