turbot/azure_insights

Query: cosmosdb_account_virtual_network_rules

Usage

powerpipe query azure_insights.query.cosmosdb_account_virtual_network_rules

Steampipe Tables

SQL

select
split_part(r ->> 'id', '/', 9) as "Name",
split_part(r ->> 'id', '/subnets', 1) as "ID",
lower(split_part(r ->> 'id', '/subnets', 1)) as lower_id,
r ->> 'id' as "Virtual Network Subnet ID",
r ->> 'ignoreMissingVnetServiceEndpoint' as "Ignore Missing VNet Service Endpoint"
from
azure_cosmosdb_account,
jsonb_array_elements(virtual_network_rules) as r
where
lower(id) = $1
and subscription_id = split_part($1, '/', 3)
union
select
'Public Network Access' as "Name",
'' as "ID",
'' as lower_id,
'' as "Virtual Network Subnet ID",
'' as "Ignore Missing VNet Service Endpoint"
from
azure_cosmosdb_account
where
public_network_access = 'Enabled'
and (jsonb_array_length(virtual_network_rules) = 0 or virtual_network_rules is null)
and lower(id) = $1
and subscription_id = split_part($1, '/', 3);

Dashboards

The query is used in the dashboards: