Azure Function to communicate to external service via VPN

523 Views Asked by At

I would like my azure function to be able to access a postgres db hosted on fly.io, however, to connect to the fly.io organisation I need to do it via a VPN/wireguard-tunnel as its hosted on a private network. Is this possible with an azure function, can I have an azure function connect to an external service via a VPN?

I have created a virtual network on azure and have a VM on that virtual network talking to the db via wireguard, but i am not sure how to do it from an azure function, any help would be most appreciated.

1

There are 1 best solutions below

0
On

Azure Functions supports accessing resources in a VNET through Virtual Network Integration.

With this and setting up a VPN Gateway on the VNET to where your DB is connected, would allow the Azure Function to access it.