turbot/azure_insights

Query: virtual_network_route_tables

Usage

powerpipe query azure_insights.query.virtual_network_route_tables

SQL

with route_table as (
select
distinct (s -> 'properties' -> 'routeTable' ->> 'id') as id
from
azure_virtual_network,
jsonb_array_elements(subnets) as s
where
lower(id) = $1
and subscription_id = split_part($1, '/', 3)
and (s -> 'properties' -> 'routeTable' ->> 'id') is not null
order by
s -> 'properties' -> 'routeTable' ->> 'id'
)
select
rt.name as "Name",
rt.provisioning_state as "Provisioning State",
r.id as "Route Table ID"
from
route_table as r left join azure_route_table as rt on lower(rt.id) = lower(r.id)

Dashboards

The query is used in the dashboards: