Azure中的专用终结点 [英] Private endpoint in Azure
问题描述
我正在尝试创建具有专用终结点(启用预览)的sql数据库.
I'm trying to create sql database with private endpoint (preview enabled).
我遇到以下错误:
{代码":"DeploymentFailed",消息":"至少一项资源部署操作失败.请列出部署操作以了解详细信息.请参阅
{"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
推荐答案
从该错误消息:PrivateEndpointCannotBeCreatedInSubnetThatHasNetworkPoliciesEnabled
,
您可以禁用网络策略使用Azure PowerShell或Azure CLI或模板在该子网virtualNetworks/plink-vnet-2/subnets/plsubnet
中用于私有终结点.
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.
例如,使用Azure CLI,
For example, using Azure CLI,
az network vnet subnet update \
--name default \
--resource-group myResourceGroup \
--vnet-name myVirtualNetwork \
--disable-private-endpoint-network-policies true
这篇关于Azure中的专用终结点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!