turbot/azure_insights

Query: virtual_network_subnet_details

Usage

powerpipe query azure_insights.query.virtual_network_subnet_details

Steampipe Tables

SQL

select
s ->> 'name' as "Name",
s -> 'properties' ->> 'addressPrefix' as "Address Prefix",
power(2, 32 - masklen((s -> 'properties' ->> 'addressPrefix'):: cidr)) -1 as "Total IPs",
s -> 'properties' ->> 'privateEndpointNetworkPolicies' as "Private Endpoint Network Policies",
s -> 'properties' ->> 'privateLinkServiceNetworkPolicies' as "Private Link Service Network Policies",
lower(s ->> 'id') as "Subnet ID"
from
azure_virtual_network,
jsonb_array_elements(subnets) as s
where
lower(id) = $1
and subscription_id = split_part($1, '/', 3)

Dashboards

The query is used in the dashboards: