turbot/azure_insights

Query: container_registries_for_key_vault_key

Usage

powerpipe query azure_insights.query.container_registries_for_key_vault_key

SQL

select
lower(r.id) as registry_id
from
azure_key_vault_key as k
left join azure_container_registry as r on r.encryption -> 'keyVaultProperties' ->> 'keyIdentifier' = k.key_uri
left join azure_key_vault_key_version as v on v.key_uri_with_version = k.key_uri_with_version
where
r.id is not null
and lower(k.id) = $1
and k.subscription_id = split_part($1, '/', 3);