turbot/alicloud
steampipe plugin install alicloud

Table: alicloud_vpc_route_entry - Query Alicloud VPC Route Entries using SQL

Alicloud VPC Route Entry is a routing rule that determines the next hop for a network packet. It is part of Alicloud's Virtual Private Cloud (VPC) service and plays a crucial role in directing traffic within the VPC. The route entry determines the path that network traffic takes based on the destination IP address of the traffic.

Table Usage Guide

The alicloud_vpc_route_entry table provides insights into the routing rules within Alicloud's Virtual Private Cloud (VPC). As a network administrator, explore route entry-specific details through this table, including the destination CIDR block, next hop type, and associated metadata. Utilize it to uncover information about route entries, such as those with specific next hop types, the traffic direction for each entry, and the status of each route entry.

Examples

Basic info

Explore the configuration of your virtual private cloud (VPC) routing table in Alibaba Cloud to understand the status and type of each route entry. This can help in managing network traffic and optimizing the performance of your cloud resources.

select
name,
route_table_id,
description,
instance_id,
route_entry_id,
destination_cidr_block,
type,
status
from
alicloud_vpc_route_entry;
select
name,
route_table_id,
description,
instance_id,
route_entry_id,
destination_cidr_block,
type,
status
from
alicloud_vpc_route_entry;

List custom route entries

Explore custom route entries to understand their configuration and status. This can be useful for managing network traffic and ensuring optimal routing within your Alicloud Virtual Private Cloud (VPC).

select
name,
route_table_id,
description,
instance_id,
route_entry_id,
destination_cidr_block,
type,
status
from
alicloud_vpc_route_entry
where
type = 'Custom';
select
name,
route_table_id,
description,
instance_id,
route_entry_id,
destination_cidr_block,
type,
status
from
alicloud_vpc_route_entry
where
type = 'Custom';

List route entries that have a next hop type of VPN gateway

Determine the areas in which your network's route entries are directed towards a VPN gateway. This is useful for assessing your network's connectivity and identifying potential security concerns.

select
name,
route_table_id,
description,
route_entry_id,
destination_cidr_block,
type,
status
from
alicloud_vpc_route_entry,
jsonb_array_elements(next_hops) as next_hop
where
next_hop ->> 'NextHopType' = 'VpnGateway';
select
name,
route_table_id,
description,
route_entry_id,
destination_cidr_block,
type,
status
from
alicloud_vpc_route_entry,
json_each(next_hops) as next_hop
where
json_extract(next_hop.value, '$.NextHopType') = 'VpnGateway';

Schema for alicloud_vpc_route_entry

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
account_idtext=, !=, ~~, ~~*, !~~, !~~*The Alicloud Account ID in which the resource is located.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
descriptiontextThe description of the VRouter.
destination_cidr_blockcidrThe destination Classless Inter-Domain Routing (CIDR) block of the route entry.
instance_idtextThe ID of the instance associated with the next hop.
ip_versiontextThe version of the IP protocol.
nametextThe name of the route entry.
next_hop_oppsite_instance_idtextThe ID of the instance associated with the next hop.
next_hop_oppsite_region_idtextThe region where the next hop instance is deployed.
next_hop_oppsite_typetextThe type of the next hop.
next_hop_region_idtextThe region where the next hop instance is deployed.
next_hop_typetextThe type of the next hop.
next_hopsjsonbThe information about the next hop.
private_ip_addressinetSpecifies the private ip address for the route entry.
regiontextThe Alicloud region in which the resource is located.
route_entry_idtextThe ID of the route entry.
route_table_idtextThe ID of the route table.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statustextThe status of the route entry.
titletextTitle of the resource.
typetextThe type of the route entry.

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)" -- alicloud

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

steampipe_export_alicloud --config '<your_config>' alicloud_vpc_route_entry