turbot/steampipe-mod-azure-insights

Query: network_network_interfaces_for_compute_virtual_machine

Usage

powerpipe query azure_insights.query.network_network_interfaces_for_compute_virtual_machine

SQL

with network_interface_id as (
select
id as vm_id,
jsonb_array_elements(network_interfaces)->>'id' as n_id
from
azure_compute_virtual_machine
where
lower(id) = $1
and subscription_id = split_part($1, '/', 3)
)
select
lower(vn.n_id) as network_interface_id
from
network_interface_id as vn
left join azure_network_interface as n on lower(vn.n_id) = lower(n.id)