@@ -309,18 +309,17 @@ resource "aws_route" "private_route_table_routes" {
309309 route_table_id = each. value . route_table_id
310310
311311 # Route attributes
312- destination_cidr_block = lookup ( each. value . route , " destination_cidr_block " , null )
313- destination_ipv6_cidr_block = lookup ( each. value . route , " destination_ipv6_cidr_block " , null )
314- egress_only_gateway_id = lookup ( each. value . route , " egress_only_gateway_id " , null )
315- gateway_id = lookup ( each. value . route , " gateway_id " , null )
316- nat_gateway_id = lookup ( each. value . route , " nat_gateway_id " , null )
317- transit_gateway_id = lookup ( each. value . route , " transit_gateway_id " , null )
318- vpc_peering_connection_id = lookup ( each. value . route , " vpc_peering_connection_id " , null )
319- local_gateway_id = lookup ( each. value . route , " local_gateway_id " , null )
320- carrier_gateway_id = lookup ( each. value . route , " carrier_gateway_id " , null )
321- destination_prefix_list_id = lookup ( each. value . route , " destination_prefix_list_id " , null )
312+ destination_cidr_block = each. value . route . destination_cidr_block != " " ? each . value . route . destination_cidr_block : null
313+ destination_ipv6_cidr_block = each. value . route . destination_ipv6_cidr_block != " " ? each . value . route . destination_ipv6_cidr_block : null
314+ egress_only_gateway_id = each. value . route . egress_only_gateway_id != " " ? each . value . route . egress_only_gateway_id : null
315+ gateway_id = each. value . route . gateway_id != " " ? each . value . route . gateway_id : null
316+ nat_gateway_id = each. value . route . nat_gateway_id != " " ? each . value . route . nat_gateway_id : null
317+ transit_gateway_id = each. value . route . transit_gateway_id != " " ? each . value . route . transit_gateway_id : null
318+ vpc_peering_connection_id = each. value . route . vpc_peering_connection_id != " " ? each . value . route . vpc_peering_connection_id : null
319+ local_gateway_id = each. value . route . local_gateway_id != " " ? each . value . route . local_gateway_id : null
320+ carrier_gateway_id = each. value . route . carrier_gateway_id != " " ? each . value . route . carrier_gateway_id : null
321+ destination_prefix_list_id = each. value . route . destination_prefix_list_id != " " ? each . value . route . destination_prefix_list_id : null
322322}
323-
324323# ###############################################################################
325324# Private Network ACLs
326325# ###############################################################################
0 commit comments