turbot/tailpipe-mod-gcp-cloud-billing-insights

Query: cloud_billing_report_cost_by_label_dashboard_projects_input

Usage

powerpipe query gcp_cloud_billing_insights.query.cloud_billing_report_cost_by_label_dashboard_projects_input

Tailpipe Tables

SQL

with project_ids as (
select
project_id,
max(project_name) as project_name
from
gcp_billing_report
group by
project_id
),
labeled as (
select
project_id || ' (' || coalesce(project_name, '') || ')' as label,
project_id as value
from
project_ids
)
select
'All' as label,
'all' as value
union all
select
label,
value
from
labeled
order by
label;