turbot/azure_insights

Query: virtual_network_num_ips

Usage

powerpipe query azure_insights.query.virtual_network_num_ips

Steampipe Tables

SQL

with cidrs as (
select
masklen((trim('"' FROM a::text))::cidr) as "Mask Length",
power(2, 32 - masklen( (trim('"' FROM a::text) ):: cidr)) as num_ips
from
azure_virtual_network,
jsonb_array_elements(address_prefixes) as a
where
lower(id) = $1
and subscription_id = split_part($1, '/', 3)
)
select
sum(num_ips) as "IP Addresses"
from
cidrs;

Dashboards

The query is used in the dashboards: