How can I make Azure function in one region communicate with Virtual Machine sitting on other region?

864 views Asked by At

I have resources spread across multiple regions (Central US and Europe) in Azure environment.

  • Function 1 - Central US
  • Function 2 - Europe
  • Virtual Network and Virtual Machine - Europe

enter image description here

I am able to connect function 2 and virtual machine using feature called VNET integration as mentioned in https://learn.microsoft.com/en-us/azure/azure-functions/functions-create-vnet

But, I am not able to connect function1 to virtual machine because these are cross region connection.

How can I solve this issue? Do I need to add VNET in central US, then do VNET Peering?

Even though VNET-VNET (Virtual Network Gateway) connection established. I am using the premium azure function. Unable to find the VNET belongs to another region in the dropdown :(

enter image description here

Solution Found

enter image description here

1

There are 1 answers

2
kudlatiger On BEST ANSWER
  • In order for function app to communicate with Virtual machine privately, function app needs to be integrated with VNET to be able to reach VM.

  • The function app running on Elastic premium plan that only gives a single option of VNET integration which is Regional VNET integration: https://learn.microsoft.com/en-us/azure/azure-functions/functions-networking-options#matrix-of-networking-features

  • Function should be into App Service Plan (Dedicated Plan). Function app is having full access to Point-to-Site VPN connection and Regional VNET integration. I was using Consumption plan and which is also one of the issues.