steampipe plugin install ibm

Table: ibm_is_subnet - Query IBM Cloud Subnets using SQL

IBM Cloud Subnets are a range of IP addresses in a VPC that are divided into smaller blocks, each with its own set of security and network connection settings. They are used to segment the network, improve security and efficiency, and help organizations manage resources in a more granular way. Subnets are a critical component of the IBM Cloud architecture, providing the foundation for deploying resources in the VPC.

Table Usage Guide

The ibm_is_subnet table provides insights into subnets within IBM Cloud VPC. As a network administrator, you can explore subnet-specific details through this table, including IP ranges, associated network ACLs, and public gateway information. Utilize it to uncover information about subnets, such as those with specific security settings, the connectivity options of each subnet, and the management of network resources.

Examples

Basic info

Explore the status and details of your network subnets, such as the range of IP addresses and associated virtual private cloud. This can be useful for managing and optimizing your network resources.

select
id,
name,
status,
ipv4_cidr_block,
total_ipv4_address_count,
vpc
from
ibm_is_subnet;
select
id,
name,
status,
ipv4_cidr_block,
total_ipv4_address_count,
vpc
from
ibm_is_subnet;

List all subnets with fewer than 251 available IPv4 addresses

Gain insights into subnets that are nearing their capacity by identifying those with fewer than 251 available IPv4 addresses. This can aid in planning and managing your network resources effectively.

select
id,
name,
status,
ipv4_cidr_block,
available_ipv4_address_count
from
ibm_is_subnet
where
available_ipv4_address_count < 251;
select
id,
name,
status,
ipv4_cidr_block,
available_ipv4_address_count
from
ibm_is_subnet
where
available_ipv4_address_count < 251;

Schema for ibm_is_subnet

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
account_idtextThe account ID of this subnet.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
available_ipv4_address_countbigintThe number of IPv4 addresses in this subnet that are not in-use, and have not been reserved by the user or the provider.
created_attimestamp with time zoneThe date and time that the subnet was created.
crntextThe CRN for this subnet.
hreftextThe URL for this subnet.
idtext=The unique identifier for this subnet.
ip_versiontextThe IP version(s) supported by this subnet.
ipv4_cidr_blockcidrThe IPv4 range of the subnet, expressed in CIDR format.
nametextThe unique user-defined name for this subnet.
network_acljsonbThe network ACL for this subnet.
public_gatewayjsonbThe public gateway to handle internet bound traffic for this subnet.
regiontextThe region of this subnet.
resource_groupjsonbThe resource group for this subnet.
routing_tablejsonbThe routing table for this subnet.
statustextThe status of this subnet.
tagsjsonbA map of tags for the resource.
titletextTitle of the resource.
total_ipv4_address_countbigintThe total number of IPv4 addresses in this subnet.
vpcjsonbThe VPC this subnet is a part of.
zonejsonbThe zone this subnet resides in.

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

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

steampipe_export_ibm --config '<your_config>' ibm_is_subnet