mikhailadvani/create_vpc

Multiple subnets with same routing rules cannot be created

Closed this issue · 0 comments

Since routing table creation iterates over the subnets, only the last subnet matching the condition(public, private with outbound access, private without outbound access) is actually associated with the routing table. Works fine if there is only one subnet with the particular routing configuration.

Scenario:

  1. 1 Public Subnet i.e. subnet.gateway = 'igw' works fine
  2. 2 Public Subnets, the last subnet defined in the configurations is actually assigned the public route table. The first one gets disassociated while iterating over with_items and falls back to the default routing table.