How to access azure function with external application when secured with Private endpoint

Viewed 25

We have a requirement where we need to access On Prem SqlServer database from the Azure function. In order to do that we have created a private endpoint.

  1. After creating private endpoint still my function is not able to access On Prem DB, do we need to white list the ipaddress provided in the Private endpoint.

  2. The other problem is we have external solution that is consuming our Azure function which is unable to access it because we have bounded our Azure function with private endpoint, we have issues in release of Azure function as well in CI/CD.

Please suggest how can we solve this.

1 Answers

To fulfill your requirement...

[...] we need to access On Prem SqlServer database from the Azure function.

... you actually do not need Private Endpoints. Private Endpoints make inbound connections to your Function App private - however, since you need to connect into the other direction - that is from your Function App to your on-premises SQL server - you would need VNET Integration.

enter image description here

See 'How regional virtual network integration works' for details.

Removing the private endpoint and using VNET integration would mean that your Function App remains public (which solves issue #2) but you would be able to access on-premises resources through private IP addresses (and/or internal DNS if required and configured on your VNET).

Related