ernw/openstack
steampipe plugin install ernw/openstack

Table: openstack_subnet

A subnet has a block of IP addresses and allows network communication between instances. Instances can be assigned to subnets.

Examples

Basic subnet info

select
name,
description,
id,
ip_version,
cidr,
gateway_ip,
allocation_pools,
enable_dhcp,
project_id
from
openstack_subnet;

Subnet by ID

select
name,
description,
id,
ip_version,
cidr,
gateway_ip,
allocation_pools,
enable_dhcp,
project_id
from
openstack_subnet
where
id = '2e4a84c9-5ee2-42d2-9608-4194b0d5e865';

All IPv4 subnets

select
name,
description,
id,
ip_version,
cidr,
gateway_ip,
allocation_pools,
enable_dhcp,
project_id
from
openstack_subnet
where
ip_version = '4';

All subnets with DHCP

select
name,
description,
id,
ip_version,
cidr,
gateway_ip,
allocation_pools,
enable_dhcp,
project_id
from
openstack_subnet
where
enable_dhcp = true;

Schema for openstack_subnet

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
allocation_poolsjsonbSub-ranges of CIDR available for dynamic allocation to ports.
cidrtextCIDR representing IP range for this subnet, based on IP version.
descriptiontextDescription for the subnet.
dns_nameserversjsonbDNS name servers used by hosts in this subnet.
enable_dhcpbooleanSpecifies whether DHCP is enabled for this subnet or not.
gateway_iptextDefault gateway used by devices in this subnet.
host_routesjsonbRoutes that should be used by devices with IPs from this subnet (not including local subnet route).
idtext=UUID representing the subnet.
ip_versionbigintIP version, either `4' or `6'.
ipv6_address_modetextThe IPv6 address modes specifies mechanisms for assigning IPv6 IP addresses.
ipv6_ra_modetextThe IPv6 router advertisement specifies whether the networking service should transmit ICMPv6 packets.
nametextHuman-readable name for the subnet. Might not be unique.
network_idtextUUID of the parent network.
project_idtextProjectID is the project owner of the subnet.
revision_numberbigintRevisionNumber optionally set via extensions/standard-attr-revisions.
subnet_pool_idtextSubnetPoolID is the id of the subnet pool associated with the subnet.
tagstextTags optionally set via extensions/attributestags.
tenant_idtextTenantID is the project owner of the subnet.