turbot/azure_insights

Query: cosmosdb_account_encryption_details

Usage

powerpipe query azure_insights.query.cosmosdb_account_encryption_details

SQL

select
k.name as "Name",
vault_name as "Vault Name",
key_type as "Key Type",
key_size as "Key Size",
key_uri_with_version as "Key URI",
k.id as "ID",
lower(k.id) as lower_id
from
azure_cosmosdb_account a,
azure_key_vault_key k
where
a.key_vault_key_uri = k.key_uri
and lower(a.id) = $1
and a.subscription_id = split_part($1, '/', 3)
union
select
'Plaform-Managed Encryption' as "Name",
'' as "Vault Name",
'' as "Key Type",
0 as "Key Size",
'' as "Key URI",
'' as "ID",
'' as lower_id
from
azure_cosmosdb_account
where
key_vault_key_uri is null
and lower(id) = $1
and subscription_id = split_part($1, '/', 3);

Dashboards

The query is used in the dashboards: