Using the google cloud web interface for add a custom route with a peering as nexthop,But in this interface and in gcloud too, we can select only as next hop:
--next-hop-address=NEXT_HOP_ADDRESS
--next-hop-gateway=NEXT_HOP_GATEWAY
--next-hop-ilb=NEXT_HOP_ILB
--next-hop-instance=NEXT_HOP_INSTANCE
--next-hop-vpn-tunnel=NEXT_HOP_VPN_TUNNEL)
--next-hop-ilb-region=NEXT_HOP_ILB_REGION]
--next-hop-instance-zone=NEXT_HOP_INSTANCE_ZONE]
--next-hop-vpn-tunnel-region=NEXT_HOP_VPN_TUNNEL_REGION
But if you do a vpc peering with automatic import and export routes, google cloud create ruotes using the peering as follow:
peering-route-c1c2eo5fcx1dfd1b my-vpc 10.0.1.0/27 vpc-peering 1000
My question is: is there anyway to create a custom route using the peering as nexthop?
Because event from google api the option exists:
NextHopPeering