steampipe plugin install azure

Table: azure_route_table - Query Azure Route Tables using SQL

A Route Table contains a set of rules, called routes, that are used to determine where network traffic is directed. Each subnet in an Azure virtual network is configured with a route table, which can be associated to one or more virtual network subnets. These tables enable you to control the flow of traffic for a subnet.

Table Usage Guide

The azure_route_table table provides insights into Route Tables within Microsoft Azure. As a network administrator, explore route-specific details through this table, including associated subnets, address prefixes, and next hop types. Utilize it to uncover information about network traffic flow, such as the routing of packets, the direction of traffic, and the configuration of subnets.

Examples

List of subnets associated with route table

Discover the segments of your network by identifying the subnets associated with a specific route table in your Azure environment. This can help in network management and security by providing insights into the organization of your network infrastructure.

select
name,
split_part(subnet ->> 'id', '/', 11) subnet,
region
from
azure_route_table
cross join jsonb_array_elements(subnets) as subnet;
Error: SQLite does not support split
or string_to_array functions.

List of route tables where route propagation is enabled

Determine the areas in which route propagation is active in your Azure Route Table. This is beneficial for understanding network traffic flow and ensuring optimal routing configurations.

select
name,
disable_bgp_route_propagation,
region
from
azure_route_table
where
not disable_bgp_route_propagation;
select
name,
disable_bgp_route_propagation,
region
from
azure_route_table
where
disable_bgp_route_propagation = 0;

Route info of each routes table

This query helps users gain insights into the routing information of each route in their Azure network. The practical application of this query is to understand the network flow and the next hop type for each route, which is crucial for network troubleshooting and optimization.

select
name,
route ->> 'name' route_name,
route -> 'properties' ->> 'addressPrefix' address_prefix,
route -> 'properties' ->> 'nextHopType' next_hop_type
from
azure_route_table
cross join jsonb_array_elements(routes) as route;
select
name,
json_extract(route.value, '$.name') as route_name,
json_extract(route.value, '$.properties.addressPrefix') as address_prefix,
json_extract(route.value, '$.properties.nextHopType') as next_hop_type
from
azure_route_table,
json_each(routes) as route;

Schema for azure_route_table

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
cloud_environmenttextThe Azure Cloud Environment.
disable_bgp_route_propagationbooleanIndicates Whether to disable the routes learned by BGP on that route table. True means disable.
etagtextAn unique read-only string that changes whenever the resource is updated
idtextContains ID to identify a route table uniquely
nametext=The friendly name that identifies the route table
provisioning_statetextThe provisioning state of the route table resource
regiontextThe Azure region/location in which the resource is located.
resource_grouptext=The resource group which holds this resource.
routesjsonbA list of routes contained within a route table
subnetsjsonbA list of references to subnets
subscription_idtextThe Azure Subscription ID in which the resource is located.
tagsjsonbA map of tags for the resource.
titletextTitle of the resource.
typetextType of the resource

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- azure

You can pass the configuration to the command with the --config argument:

steampipe_export_azure --config '<your_config>' azure_route_table