简体   繁体   English

Azure 中的私有端点

[英]Private endpoint in Azure

I'm trying to create sql database with private endpoint (preview enabled).我正在尝试使用私有端点(启用预览)创建 sql 数据库。

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}"}]} {"code":"DeploymentFailed","message":"至少一项资源部署操作失败。请列出部署操作以了解详细信息。请参阅https://aka.ms/arm-debug了解使用详情。","详细信息":[{"code":"BadRequest","message":"{\r\n \"error\": {\r\n \"code\": \"PrivateEndpointCannotBeCreatedInSubnetThatHasNetworkPoliciesEnabled\",\r\n \ “消息\”:\“无法在子网/subscriptions/1efd84d6-中创建私有端点/subscriptions/1efd84d6-173f-42cc-80db-7b2c17eb0edd/resourceGroups/eu_poland_general/providers/Microsoft.Network/privateEndpoints/plink-private-endpoint- 173f-42cc-80db-7b2c17eb0edd/resourceGroups/eu_poland_general/providers/Microsoft.Network/virtualNetworks/plink-vnet-2/subnets/plsubnet,因为它启用了专用终结点网络策略。\",\r\n \"详细信息\" : []\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我已经浏览了门户中的所有选项,但找不到任何有用的东西

From that error message: PrivateEndpointCannotBeCreatedInSubnetThatHasNetworkPoliciesEnabled ,从该错误消息: 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.您可以使用 Azure PowerShell 或 Z3A580F142203677F1F0BC30898F63F 或模板 3 禁用该子网virtualNetworks/plink-vnet-2/subnets/plsubnet 中专用端点的网络策略

For example, using Azure CLI,例如,使用 Azure CLI,

az network vnet subnet update \ 
  --name default \ 
  --resource-group myResourceGroup \ 
  --vnet-name myVirtualNetwork \ 
  --disable-private-endpoint-network-policies true

In the portal, I'm assuming you are doing this from the sql database create.在门户中,我假设您是从 sql 数据库创建的。 You should be able to create a sql database without a private endpoint and then use the individual private endpoint create as it will properly handle disabling the network policies in the subnet for the private endpoint.您应该能够在没有私有端点的情况下创建 sql 数据库,然后使用单独的私有端点创建,因为它将正确处理在子网中为私有端点禁用网络策略。 You can find the individual private endpoint create as the first start button in the overview of the Private Link Center.您可以在专用链接中心的概述中找到作为第一个开始按钮创建的单个专用端点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM