Skip to content

Commit f4ab998

Browse files
authored
Fix the instructions for disabling privateLinkServiceNetworkPolicies
Fixed the link to point to to the correct Private Link Service Network Policies documentation and fix the incorrect instructions for disabling privateLinkServiceNetworkPolicies
1 parent 1dc82b6 commit f4ab998

1 file changed

Lines changed: 67 additions & 12 deletions

File tree

articles/application-gateway/private-link-configure.md

Lines changed: 67 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,73 @@ To create a dedicated subnet for Private Link, see [Add, change, or delete a vir
5656

5757
## Disable network policies on the Private Link subnet
5858

59-
To allow Private Link connectivity, you must [disable the Private Link Service Network Policies](../private-link/disable-private-endpoint-network-policy.md#disable-network-policy) on the subnet designated for Private Link IP configurations.
60-
61-
To disable network policies, follow these steps:
62-
1. Navigate to the [Azure portal](https://portal.azure.com).
63-
1. Search for and select **Virtual networks**.
64-
1. Select the virtual network containing the Private Link subnet.
65-
1. In the left navigation pane, select **Subnets**.
66-
1. Select the subnet designated for Private Link.
67-
1. Under **Private link service network policies**, select **Disabled**.
68-
1. Select **Save** to apply the changes.
69-
1. Wait a few minutes for the changes to take effect.
70-
1. Verify the **Private link service network policies** setting is now **Disabled**.
59+
To allow Private Link connectivity, you must [disable the Private Link Service Network Policies](../private-link//disable-private-link-service-network-policy.md) on the subnet designated for Private Link IP configurations.
60+
61+
When you use the portal to create an instance of the Private Link service, this setting is automatically disabled as part of the creation process. Deployments using any Azure client (PowerShell, Azure CLI, or templates) require an extra step to change this property.
62+
63+
The following examples describe how to enable and disable `privateLinkServiceNetworkPolicies` for a virtual network named `myVNet` with a `default` subnet of `10.1.0.0/24` hosted in a resource group named `myResourceGroup`.
64+
65+
# [**PowerShell**](#tab/private-link-network-policy-powershell)
66+
67+
This section describes how to disable subnet private endpoint policies by using Azure PowerShell. In the following code, replace `default` with the name of your virtual subnet.
68+
69+
```azurepowershell
70+
$subnet = 'default'
71+
72+
$net = @{
73+
Name = 'myVNet'
74+
ResourceGroupName = 'myResourceGroup'
75+
}
76+
$vnet = Get-AzVirtualNetwork @net
77+
78+
($vnet | Select -ExpandProperty subnets | Where-Object {$_.Name -eq $subnet}).privateLinkServiceNetworkPolicies = "Disabled"
79+
80+
$vnet | Set-AzVirtualNetwork
81+
```
82+
83+
# [**CLI**](#tab/private-link-network-policy-cli)
84+
85+
This section describes how to disable subnet private endpoint policies by using the Azure CLI.
86+
87+
```azurecli
88+
az network vnet subnet update \
89+
--name default \
90+
--vnet-name MyVnet \
91+
--resource-group myResourceGroup \
92+
--disable-private-link-service-network-policies yes
93+
```
94+
95+
# [**JSON**](#tab/private-link-network-policy-json)
96+
97+
This section describes how to disable subnet private endpoint policies by using Azure Resource Manager templates.
98+
99+
```json
100+
{
101+
"name": "myVNet",
102+
"type": "Microsoft.Network/virtualNetworks",
103+
"apiVersion": "2019-04-01",
104+
"location": "WestUS",
105+
"properties": {
106+
"addressSpace": {
107+
"addressPrefixes": [
108+
"10.1.0.0/16"
109+
]
110+
},
111+
"subnets": [
112+
{
113+
"name": "default",
114+
"properties": {
115+
"addressPrefix": "10.1.0.0/24",
116+
"privateLinkServiceNetworkPolicies": "Disabled"
117+
}
118+
}
119+
]
120+
}
121+
}
122+
123+
```
124+
125+
---
71126

72127
## Configure Private Link
73128

0 commit comments

Comments
 (0)