Skip to main content
Version: 0.0.25

Table: subnet

Table to manage AWS subnet entries. A subnet is a range of IP addresses in your VPC. You can launch AWS resources into a specified subnet. Use a public subnet for resources that must be connected to the internet, and a private subnet for resources that won't be connected to the internet.


 INSERT INTO subnet (availability_zone, vpc_id, cidr_block) SELECT 'us-east-1a', id, ''
FROM vpc WHERE is_default = false AND cidr_block = '';



availability_zone: availability_zone

Reference to the availability zone associated with this subnet

Optional available_ip_address_count: number

The number of IPv4 addresses in the subnet that are available.

Optional cidr_block: string

The IPv4 CIDR block of the subnet. The CIDR block you specify must exactly match the subnet's CIDR block for information to be returned for the subnet. You can also use cidr or cidrBlock as the filter names.

Optional explicit_route_table_associations: route_table_association[]

Reference to the route table associations for this subnet

Optional owner_id: string

The AWS account ID for the owner of this subnet

region: string

Reference to the region where it belongs

Optional state: subnet_state

Current state of the subnet

Optional subnet_arn: string

AWS ARN used to identify the subnet

Optional subnet_id: string

AWS ID used to identify the subnet

vpc: vpc

Reference to the VPC associated with this subnet