https://pulumi.com logo
Title
c

colossal-market-93154

12/21/2021, 1:34 PM
does anyone know how to use local at RouteTable?
new aws.ec2.RouteTable("main-route-table", {
  routes: [
    {
      cidrBlock: "172.30.0.0/16",
      localGatewayId: "local",  // THIS PART HERE
    },
All of the options for routes parameter are asking for ids:
error creating route: one of `carrier_gateway_id, egress_only_gateway_id, gateway_id, instance_id, local_gateway_id, nat_gateway_id, network_interface_id, transit_gateway_id, vpc_endpoint_id, vpc_peering_connection_id` must be specified
l

little-cartoon-10569

12/21/2021, 7:35 PM
What do you want "local" to achieve? Send traffic to localhost interface on origin machine? Or maybe to 0.0.0.0 interface?
I think in both these cases, you might have to resort to your hosts file. Route tables apply to all machines in a subnet, so they don't really support the concept of "here" (yet?).
Ah, I forgot about the default route, called "local". That's probably what you mean? I think you can't add one of those, or edit or delete it. It's just there, and it's the default for everything that other rules don't catch.
From https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html:
Every route table contains a local route for communication within the VPC. This route is added by default to all route tables. If your VPC has more than one IPv4 CIDR block, your route tables contain a local route for each IPv4 CIDR block. If you've associated an IPv6 CIDR block with your VPC, your route tables contain a local route for the IPv6 CIDR block. You cannot modify or delete these routes in a subnet route table or in the main route table.
🙌 1