You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/frontdoor/how-to-enable-private-link-application-gateway.md
+75-57Lines changed: 75 additions & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ services: frontdoor
6
6
author: duongau
7
7
ms.service: azure-frontdoor
8
8
ms.topic: how-to
9
-
ms.date: 09/20/2024
9
+
ms.date: 09/23/2024
10
10
ms.author: duau
11
11
zone_pivot_groups: front-door-dev-exp-ps-cli
12
12
ms.custom: ai-usage
@@ -43,9 +43,7 @@ Follow the instructions in [Configure Azure Application Gateway Private Link](..
43
43
1. Use [New-AzFrontDoorCdnOriginGroupHealthProbeSettingObject](/powershell/module/az.cdn/new-azfrontdoorcdnorigingrouphealthprobesettingobject) to create an in-memory object for storing the health probe settings.
@@ -55,9 +53,7 @@ Follow the instructions in [Configure Azure Application Gateway Private Link](..
55
53
1. Use [New-AzFrontDoorCdnOriginGroupLoadBalancingSettingObject](/powershell/module/az.cdn/new-azfrontdoorcdnorigingrouploadbalancingsettingobject) to create an in-memory object for storing load balancing settings.
@@ -66,51 +62,57 @@ Follow the instructions in [Configure Azure Application Gateway Private Link](..
66
62
1. Run [New-AzFrontDoorCdnOriginGroup](/powershell/module/az.cdn/new-azfrontdoorcdnorigingroup) to create an origin group that contains your application gateway.
67
63
68
64
```azurepowershell-interactive
69
-
# Create origin group
70
-
71
-
$originpool = New-AzFrontDoorCdnOriginGroup `
72
-
-OriginGroupName og `
73
-
-ProfileName contosoAFD `
74
-
-ResourceGroupName myRGFD `
75
-
-HealthProbeSetting $HealthProbeSetting `
76
-
-LoadBalancingSetting $LoadBalancingSetting
65
+
$origingroup = New-AzFrontDoorCdnOriginGroup `
66
+
-OriginGroupName myOriginGroup `
67
+
-ProfileName myFrontDoorProfile `
68
+
-ResourceGroupName myResourceGroup `
69
+
-HealthProbeSetting $healthProbeSetting `
70
+
-LoadBalancingSetting $loadBalancingSetting
71
+
```
72
+
73
+
1. Get the frontend IP configuration name of the Application Gateway with the [Get-AzApplicationGatewayFrontendIPConfig](/powershell/module/az.network/get-azapplicationgatewayfrontendipconfig) command.
-SharedPrivateLinkResourceRequestMessage 'AFD Private Link request' `
97
+
-SharedPrivateLinkResourceRequestMessage 'Azure Front Door private connectivity request' `
96
98
-Weight 1000 `
97
99
```
98
100
99
101
> [!NOTE]
100
-
> 'SharedPrivateLinkResourceGroupId' is the same as the Application Gateway frontend IP configuration. This value may be different for different frontend IP configurations.
102
+
> `SharedPrivateLinkResourceGroupId` is the name of the Azure Application Gateway frontend IP configuration.
101
103
102
104
## Approve the private endpoint
103
105
104
106
1. Run [Get-AzPrivateEndpointConnection](/powershell/module/az.network/get-azprivateendpointconnection) to retrieve the connection name of the private endpoint connection that needs approval.
2. Run [Get-AzPrivateEndpointConnection](/powershell/module/az.network/get-azprivateendpointconnection) to retrieve the private endpoint connection details. Use the *Name* value from the output in the next step for approving the connection.
@@ -121,14 +123,14 @@ Use the [New-AzFrontDoorCdnRoute](/powershell/module/az.cdn/new-azfrontdoorcdnro
121
123
# Create a route to map the endpoint to the origin group
122
124
123
125
$Route = New-AzFrontDoorCdnRoute `
124
-
-EndpointName contosofrontend `
125
-
-Name defaultroute `
126
-
-ProfileName contosoAFD `
127
-
-ResourceGroupName myRGFD `
126
+
-EndpointName myFrontDoorEndpoint `
127
+
-Name myRoute `
128
+
-ProfileName myFrontDoorProfile `
129
+
-ResourceGroupName myResourceGroup `
128
130
-ForwardingProtocol MatchRequest `
129
131
-HttpsRedirect Enabled `
130
132
-LinkToDefaultDomain Enabled `
131
-
-OriginGroupId og `
133
+
-OriginGroupId $origingroup.Id `
132
134
-SupportedProtocol Http,Https
133
135
```
134
136
@@ -156,9 +158,9 @@ Follow the steps in [Configure Azure Application Gateway Private Link](../applic
156
158
157
159
```azurecli-interactive
158
160
az afd origin-group create \
159
-
--resource-group myRGFD \
160
-
--origin-group-name og \
161
-
--profile-name contosoafd \
161
+
--resource-group myResourceGroup \
162
+
--origin-group-name myOriginGroup \
163
+
--profile-name myFrontDoorProfile \
162
164
--probe-request-type GET \
163
165
--probe-protocol Http \
164
166
--probe-interval-in-seconds 60 \
@@ -168,15 +170,21 @@ Follow the steps in [Configure Azure Application Gateway Private Link](../applic
168
170
--additional-latency-in-milliseconds 50
169
171
```
170
172
173
+
1. Run [az network application-gaeay frontend-ip list](/cli/azure/network/application-gateway/frontend-ip#az-network-application-gateway-frontend-ip-list) to get the frontend IP configuration name of the Application Gateway.
174
+
175
+
```azurecli-interactive
176
+
az network application-gateway frontend-ip list --gateway-name myAppGateway --resource-group myResourceGroup
177
+
```
178
+
171
179
1. Run [az afd origin create](/cli/azure/afd/origin#az-afd-origin-create) to add an application gateway as an origin to the origin group.
172
180
173
181
```azurecli-interactive
174
182
az afd origin create \
175
183
--enabled-state Enabled \
176
-
--resource-group myRGFD \
177
-
--origin-group-name og \
178
-
--origin-name appgwog \
179
-
--profile-name contosoafd \
184
+
--resource-group myResourceGroup \
185
+
--origin-group-name myOriginGroup \
186
+
--origin-name myAppGatewayOrigin \
187
+
--profile-name myFrontDoorProfile \
180
188
--host-name 10.0.0.4 \
181
189
--origin-host-header 10.0.0.4 \
182
190
--http-port 80 \
@@ -185,41 +193,41 @@ Follow the steps in [Configure Azure Application Gateway Private Link](../applic
185
193
--weight 500 \
186
194
--enable-private-link true \
187
195
--private-link-location centralus \
188
-
--private-link-request-message 'AFD Private Link request.' \
196
+
--private-link-request-message 'Azure Front Door private connectivity request.' \
> `SharedPrivateLinkResourceGroupId` is the same as the Application Gateway frontend IP configuration. This value may be different for different frontend IP configurations.
201
+
> [!NOTE]
202
+
> `private-link-sub-resource-type` is the Azure Application Gateway frontend IP configuration name.
195
203
196
204
## Approve the private endpoint connection
197
205
198
-
1. Retrieve the listof private endpoint connections:
206
+
1. Run [az network private-endpoint-connection list](/cli/azure/network/private-endpoint-connection#az-network-private-endpoint-connection-list) to get the **id** of the private endpoint connection that needs approval.
199
207
200
208
```azurecli-interactive
201
-
az network private-endpoint-connection list --name myAppGateway --resource-group myRGAG --type Microsoft.Network/applicationgateways
209
+
az network private-endpoint-connection list --name myAppGateway --resource-group myResourceGroup --type Microsoft.Network/applicationgateways
202
210
```
203
211
204
-
1. Approve the private endpoint connection:
205
-
212
+
1. Run [az network private-endpoint-connection approve](/cli/azure/network/private-endpoint-connection#az-network-private-endpoint-connection-approve) to approve the private endpoint connection using the **id** from the previous step.
206
213
207
214
```azurecli-interactive
208
-
az network private-endpoint-connection approve --id /subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/myRGAG/providers/Microsoft.Network/applicationGateways/myAppGateway/privateEndpointConnections/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb.bbbbbbbb-1111-2222-3333-cccccccccccc
215
+
az network private-endpoint-connection approve --id /subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/myResourceGroup/providers/Microsoft.Network/applicationGateways/myAppGateway/privateEndpointConnections/aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb.bbbbbbbb-1111-2222-3333-cccccccccccc
209
216
```
210
217
211
-
1. Add a route to map the endpoint to the origin group:
218
+
## Complete Azure Front Door setup
219
+
220
+
1. Run [az afd route create](/cli/azure/afd/route#az-afd-route-create) to create a route that maps your endpoint to the origin group. This route forwards requests from the endpoint to your origin group.
212
221
213
222
```azurecli-interactive
214
223
az afd route create \
215
-
--resource-group myRGFD \
216
-
--profile-name contosoafd \
217
-
--endpoint-name contosofrontend \
224
+
--resource-group myResourceGroup \
225
+
--profile-name myFrontDoorProfile \
226
+
--endpoint-name myFrontDoorEndpoint \
218
227
--forwarding-protocol MatchRequest \
219
-
--route-name route \
220
-
--route-name route \
228
+
--route-name myRoute \
221
229
--https-redirect Enabled \
222
-
--origin-group og \
230
+
--origin-group myOriginGroup \
223
231
--supported-protocols Http Https \
224
232
--link-to-default-domain Enabled
225
233
```
@@ -230,13 +238,23 @@ Your Azure Front Door profile is now fully functional after completing the final
230
238
231
239
## Common mistakes to avoid
232
240
233
-
The following are common mistakes when configuring an application gateway origin with Private Link enabled:
241
+
The following are common mistakes when configuring an Azure Application Gateway origin with Azure Private Link enabled:
242
+
243
+
1. Configuring Azure Front Door origin before configuring Azure Private Link on the Azure Application Gateway.
244
+
245
+
1. Adding the Azure Application Gateway origin with Azure Private Link to an existing origin group that contains public origins. Azure Front Door doesn't allow mixing public and private origins in the same origin group.
246
+
247
+
::: zone pivot="front-door-ps"
248
+
249
+
1. Providing an incorrect Azure Application Gateway frontend IP configuration name as the value for `SharedPrivateLinkResourceGroupId`.
234
250
235
-
1. Not configuring Private Link before starting the Azure Front Door creation steps.
251
+
::: zone-end
236
252
237
-
1. Adding the Azure Application Gateway origin with Private Link to an existing origin group that contains public origins. Front Door doesn't allow mixing public and private origins in the same origin group.
253
+
::: zone pivot="front-door-cli"
238
254
239
-
1. Providing an incorrect Azure Application Gateway frontend IP configuration name as the value for `GroupId`.
255
+
1. Providing an incorrect Azure Application Gateway frontend IP configuration name as the value for `private-link-sub-resource-type`.
0 commit comments