Disabling iCloud Drive sync on specific Wifi networks
Try TripMode. It's a third party app, but it's build to do exactly what you want. There's a free trial as well.


  TripMode activates itself on networks where you’ve turned it on before. Set it, then forget it.