Skip to main content

subnets_list_only

Lists subnets in a region or regions, for all properties use subnets

Overview

Namesubnets_list_only
TypeResource
DescriptionSpecifies a subnet for the specified VPC.
For an IPv4 only subnet, specify an IPv4 CIDR block. If the VPC has an IPv6 CIDR block, you can create an IPv6 only subnet or a dual stack subnet instead. For an IPv6 only subnet, specify an IPv6 CIDR block. For a dual stack subnet, specify both an IPv4 CIDR block and an IPv6 CIDR block.
For more information, see [Subnets for your VPC](https://docs.aws.amazon.com/vpc/latest/userguide/configure-subnets.html) in the *Amazon VPC User Guide*.
Idaws.ec2.subnets_list_only

Fields

NameDatatypeDescription
subnet_idstring
regionstringAWS region.

Methods

NameAccessible byRequired Params
list_resourcesSELECTregion

SELECT examples

Lists all subnets in a region.

SELECT
region,
subnet_id
FROM aws.ec2.subnets_list_only
WHERE region = 'us-east-1';

Permissions

For permissions required to operate on the subnets_list_only resource, see subnets