This repo shows an example of using terraform to create a secure VNET, inside of which we create azure functions and all necessary networking infrastructure for intra-VPN communication.
Note: This is a client demo and not maintained; please don't message me asking how to make it work. :)