turbot/tailpipe-mod-azure-cost-and-usage-insights

Query: cost_and_usage_actual_cost_by_service_dashboard_subscriptions_input

Usage

powerpipe query azure_cost_and_usage_insights.query.cost_and_usage_actual_cost_by_service_dashboard_subscriptions_input

SQL

with subscription_ids as (
select
distinct on(subscription_id)
subscription_id ||
case
when subscription_name is not null then ' (' || subscription_name || ')'
else ''
end as label,
subscription_id as value
from
azure_cost_and_usage_actual
order by
subscription_id
)
select
'All' as label,
'all' as value
union all
select
label,
value
from
subscription_ids;