Skip to main content
Version: 0.0.25

Table: route_table_association

Table to manage associations between a Route and a Route table.

Example

INSERT INTO route_table_association (route_table_id, vpc_id, subnet_id) VALUES
((SELECT id FROM route_table WHERE tags ->> 'name' = 'route_table'),
(SELECT id FROM vpc WHERE tags ->> 'name' = 'vpc'),
(SELECT id FROM subnet WHERE cidr_block = '10.0.1.0/24' AND availability_zone = 'us-east-1a'));
SELECT * FROM route_table_association WHERE route_table_id = (SELECT id FROM route_table WHERE tags ->> 'name' = 'route_table');

DELETE FROM route_table_association WHERE route_table_id = (SELECT id FROM route_table WHERE tags ->> 'name' = 'route_table');

See

Columns

is_main: boolean

Whether this is the main route association Main is the route table that automatically comes with your VPC. It controls the routing for all subnets that are not explicitly associated with any other route table.

route_table: route_table

Reference to the route table for this association

Optional route_table_association_id: string

AWS ID to identify the route table association

Optional subnet: subnet

Your VPC has an implicit router, and you use route tables to control where network traffic is directed. Each subnet in your VPC must be associated with a route table, which controls the routing for the subnet (subnet route table).

See

https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html#subnet-route-tables

vpc: vpc

Reference to the VPC for this association