Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Private endpoint in Azure

I'm trying to create sql database with private endpoint (preview enabled).

I'm getting following error:

{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details.","details":[{"code":"BadRequest","message":"{\r\n \"error\": {\r\n \"code\": \"PrivateEndpointCannotBeCreatedInSubnetThatHasNetworkPoliciesEnabled\",\r\n \"message\": \"Private endpoint /subscriptions/1efd84d6-173f-42cc-80db-7b2c17eb0edd/resourceGroups/eu_poland_general/providers/Microsoft.Network/privateEndpoints/plink-private-endpoint cannot be created in a subnet /subscriptions/1efd84d6-173f-42cc-80db-7b2c17eb0edd/resourceGroups/eu_poland_general/providers/Microsoft.Network/virtualNetworks/plink-vnet-2/subnets/plsubnet since it has private endpoint network policies enabled.\",\r\n \"details\": []\r\n }\r\n}"}]}

it seems that the virtual network subnet that i'm trying to connect has some option enabled. I have went through all the options in portal, but can't really find anything usefull

like image 751
Dzior Avatar asked Oct 15 '19 08:10

Dzior


People also ask

What is an Azure private endpoint?

A private endpoint is a network interface that uses a private IP address from your virtual network. This network interface connects you privately and securely to a service that's powered by Azure Private Link. By enabling a private endpoint, you're bringing the service into your virtual network.

What is service endpoint and private endpoint in Azure?

A Service Endpoint remains a publicly routable IP address. A Private Endpoint is a private IP in the address space of the virtual network where the private endpoint is configured.

How do I access Azure private endpoint?

Select the Networking tab or select the Next: Networking button. In the Networking tab, under Network connectivity select Disable public access and use private access. In Private endpoint, select + Add private endpoint. Select your Azure subscription.


1 Answers

From that error message:PrivateEndpointCannotBeCreatedInSubnetThatHasNetworkPoliciesEnabled,

You could disable network policies for private endpoints in that subnet virtualNetworks/plink-vnet-2/subnets/plsubnet with Azure PowerShell or Azure CLI or template.

For example, using Azure CLI,

az network vnet subnet update \ 
  --name default \ 
  --resource-group myResourceGroup \ 
  --vnet-name myVirtualNetwork \ 
  --disable-private-endpoint-network-policies true
like image 182
Nancy Xiong Avatar answered Oct 12 '22 11:10

Nancy Xiong