I am trying to add a private endpoint in azure for a azure function app. So even using the panel.azure.com I get information that its subnet is using delegate serverfarms. When I remove the delegate and redeploy the VN, I cannot deploy the function as its literally telling me that I should set serverfarms delegation on that function's subnet. How to avoid this issue or how to fix it? I am not sure how to diagnose what is the serverfarms needed for, other than that azure tells me that I need to set that property. My underlying question would be what is the root cause why the function app requires serverfarms delegation in the subnet before deploying?
1 Answers
why the function app requires serverfarms delegation in the subnet before deploying?
An Azure Service with subnet delegation may establish some pre or post deployment conditions, such as:
- deploy the service in a shared versus dedicated subnet.
- add to the service a set of Network Intent Policies post deployment that is required for the service to work properly.
The azure function will have some impact when using the subnet delegation like:
- supports NSG association
- dictates the minimum number of IP Addresses in the delegated subnet
- helps injected services to better integrate with the virtual network by defining their pre-conditions of deployments in the form of Network Intent Policies.
To remove subnet delegation from an Azure service
- In the portal's search bar, enter myVirtualNetwork. When myVirtualNetwork appears in the search results, select it.
- Select Subnets, under SETTINGS, and then select mySubnet.
- In mySubnet page, for the Subnet delegation list, select None from the services listed under Delegate subnet to a service.
Please refer why azure service requires subnet delegation during deployment conditions and how to fix this subnet delegation using portal as well as CLI.
Updated Answer
Some properties will be defined like computeMode
, sku object
description by serverfarm based on the hosting plan, the azure resources (function or web app, etc) were deployed.
If they're incorrect or the any mismatch in deployed locations of resources found, then few errors occurs like server farm is not found, or required or related to server farm.
Please see this SO Thread 1 and Thread 2 where few users have got the problems if server farm defined properties are mismatched.
And This Microsoft documentation tells what is the server farm, what kind of resources are belongs to server farm type and sample bicep/json template code for each hosting plan contains the properties defined by server farm to azure functions especially.
-
Does not answer why serverfarms specifically are are required before deploying the function app. Serverfarms is an azure object and azure specifically outputs error when deploying the functionapp that the serverfarms delegation is missing – kol23 Nov 18 '21 at 12:49
-
Yes Kol23! Updated the answer, please check. – Nov 18 '21 at 13:44