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, vpcfrom ibm_is_subnet;
select id, name, status, ipv4_cidr_block, total_ipv4_address_count, vpcfrom 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_countfrom ibm_is_subnetwhere available_ipv4_address_count < 251;
select id, name, status, ipv4_cidr_block, available_ipv4_address_countfrom ibm_is_subnetwhere available_ipv4_address_count < 251;
Query examples
Schema for ibm_is_subnet
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The ID fof the account. |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
available_ipv4_address_count | bigint | The number of IPv4 addresses in this subnet that are not in-use, and have not been reserved by the user or the provider. | |
created_at | timestamp with time zone | The date and time that the subnet was created. | |
crn | text | The CRN for this subnet. | |
href | text | The URL for this subnet. | |
id | text | = | The unique identifier for this subnet. |
ip_version | text | The IP version(s) supported by this subnet. | |
ipv4_cidr_block | cidr | The IPv4 range of the subnet, expressed in CIDR format. | |
name | text | The unique user-defined name for this subnet. | |
network_acl | jsonb | The network ACL for this subnet. | |
public_gateway | jsonb | The public gateway to handle internet bound traffic for this subnet. | |
region | text | The region of this subnet. | |
resource_group | jsonb | The resource group for this subnet. | |
routing_table | jsonb | The routing table for this subnet. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | text | The status of this subnet. | |
tags | jsonb | A map of tags for the resource. | |
title | text | Title of the resource. | |
total_ipv4_address_count | bigint | The total number of IPv4 addresses in this subnet. | |
vpc | jsonb | The VPC this subnet is a part of. | |
zone | jsonb | The 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