turbot/gcp_insights

Query: compute_instance_age_table

Usage

powerpipe query gcp_insights.query.compute_instance_age_table

SQL

select
i.name as "Name",
i.id::text as "ID",
now()::date - i.creation_timestamp::date as "Age in Days",
i.creation_timestamp as "Create Time",
i.status as "Status",
p.name as "Project",
p.project_id as "Project ID",
i.location as "Location",
i.self_link as "Self-Link"
from
gcp_compute_instance as i,
gcp_project as p
where
p.project_id = i.project
order by
i.creation_timestamp,
i.name;

Dashboards

The query is used in the dashboards: