turbot/gcp_insights

Query: service_account_key_age_table

Usage

powerpipe query gcp_insights.query.service_account_key_age_table

SQL

select
k.name as "Key Name",
now()::date - k.valid_after_time::date as "Age in Days",
k.valid_after_time as "Create Date",
p.name as "Project",
k.key_type as "Key Type",
p.project_id as "Project ID",
k.service_account_name as "Service Account Name"
from
gcp_service_account_key as k,
gcp_project as p
where
p.project_id = k.project
order by
k.valid_after_time,
k.name;

Dashboards

The query is used in the dashboards: