turbot/ibm_insights

Query: ibm_kms_key_age_table

Usage

powerpipe query ibm_insights.query.ibm_kms_key_age_table

Steampipe Tables

SQL

select
k.name as "Name",
now() :: date - k.creation_date :: date as "Age in Days",
k.creation_date as "Create Date",
case
when k.state = '0' then 'Pre-activation'
when k.state = '1' then 'Active'
when k.state = '2' then 'Suspended'
when k.state = '3' then 'Deactivated'
when k.state = '5' then 'Destroyed'
else k.state
end as "State",
a.name as "Account",
k.account_id as "Account ID",
k.region as "Region",
k.crn as "CRN",
k.id as "Key ID"
from
ibm_kms_key as k,
ibm_account as a
where
k.account_id = a.customer_id
and k.state <> '5'
order by
k.name;

Dashboards

The query is used in the dashboards: