turbot/oci_insights

Query: kms_key_age_report

Usage

powerpipe query oci_insights.query.kms_key_age_report

SQL

select
k.name as "Name",
k.id as "OCID",
now() :: date - k.time_created :: date as "Age in Days",
k.time_created as "Create Time",
k.vault_name as "Vault Name",
k.lifecycle_state as "Lifecycle State",
t.title as "Tenancy",
coalesce(c.title, 'root') as "Compartment",
k.region as "Region"
from
oci_kms_key as k
left join oci_identity_compartment as c on k.compartment_id = c.id
left join oci_identity_tenancy as t on k.tenant_id = t.id
where
k.lifecycle_state <> 'DELETED'
order by
k.time_created,
k.name;

Dashboards

The query is used in the dashboards: