turbot/azure_insights

Query: key_vault_key_age_table

Usage

powerpipe query azure_insights.query.key_vault_key_age_table

SQL

select
k.name as "Name",
lower(k.id) as "ID",
now()::date - k.created_at::date as "Age in Days",
k.created_at as "Creation Date",
k.vault_name as "Vault Name",
k.expires_at as "Key Expiration",
k.key_size as "Key Size",
k.key_type as "Key Type",
sub.title as "Subscription",
k.subscription_id as "Subscription ID",
k.resource_group as "Resource Group",
k.region as "Region",
lower(v.id) as "Vault ID"
from
azure_key_vault_key as k
left join azure_key_vault as v on v.name = k.vault_name,
azure_subscription as sub
where
k.subscription_id = v.subscription_id
and k.resource_group = v.resource_group
and k.subscription_id = sub.subscription_id
order by
k.created_at,
k.name;

Dashboards

The query is used in the dashboards: