def setup_rt(self):
    route_table_tag = ROUTE_TABLE_PREFIX_FORMAT.format(self.region)
    route_table = create_route_table(client=self.client, tag_name=route_table_tag, vpc=self.vpc)
    add_route_to_rt(route_table, IGW_CIDR, 'GatewayId', self.igw.id)
    current_associated_subnet_ids = [assoc.subnet_id for assoc in route_table.associations]
    missing_ids = [subnet.id for subnet in self.subnets.values() if (subnet.id not in current_associated_subnet_ids)]
    for subnet_id in missing_ids:
        route_table.associate_with_subnet(SubnetId=subnet_id)
    self.route_table = route_table
def setup_rt(self):
    route_table_tag = ROUTE_TABLE_PREFIX_FORMAT.format(self.region)
    route_table = create_route_table(client=self.client, tag_name=route_table_tag, vpc=self.vpc)
    add_route_to_rt(route_table, IGW_CIDR, 'GatewayId', self.igw.id)
    current_associated_subnet_ids = [assoc.subnet_id for assoc in route_table.associations]
    missing_ids = [subnet.id for subnet in self.subnets.values() if (subnet.id not in current_associated_subnet_ids)]
    for subnet_id in missing_ids:
        route_table.associate_with_subnet(SubnetId=subnet_id)
    self.route_table = route_table