Skip to content

Commit ffe96cf

Browse files
authored
Merge pull request #302177 from halkazwini/afd-sa
AFD to storage with PL: article consolidation
2 parents 072bc75 + 4becc35 commit ffe96cf

File tree

4 files changed

+105
-115
lines changed

4 files changed

+105
-115
lines changed

articles/frontdoor/.openpublishing.redirection.frontdoor.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"redirections": [
3+
{
4+
"source_path_from_root": "/articles/frontdoor/standard-premium/how-to-enable-private-link-storage-account-cli.md",
5+
"redirect_url": "/azure/frontdoor/standard-premium/how-to-enable-private-link-storage-account",
6+
"redirect_document_id": false
7+
},
38
{
49
"source_path_from_root": "/articles/cdn/index.yml",
510
"redirect_url": "/azure/frontdoor",

articles/frontdoor/TOC.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,8 @@
115115
items:
116116
- name: Connect to an internal load balancer
117117
href: standard-premium/how-to-enable-private-link-internal-load-balancer.md
118-
- name: Connect to Azure Storage Account
119-
items:
120-
- name: Azure portal
121-
href: standard-premium/how-to-enable-private-link-storage-account.md
122-
- name: Azure CLI
123-
href: standard-premium/how-to-enable-private-link-storage-account-cli.md
118+
- name: Connect to Azure Storage account
119+
href: standard-premium/how-to-enable-private-link-storage-account.md
124120
- name: Connect to Azure Storage static website
125121
href: how-to-enable-private-link-storage-static-website.md
126122
- name: Connect to Azure App Service

articles/frontdoor/standard-premium/how-to-enable-private-link-storage-account-cli.md

Lines changed: 0 additions & 82 deletions
This file was deleted.
Lines changed: 98 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,68 @@
11
---
2-
title: 'Connect Azure Front Door Premium to a storage account origin with Private Link'
2+
title: Connect Azure Front Door to a Storage Account Origin
33
titleSuffix: Azure Private Link
4-
description: Learn how to connect your Azure Front Door Premium to a storage account privately.
4+
description: Learn how to connect your Azure Front Door Premium to a storage account privately with Azure Private Link.
55
author: halkazwini
66
ms.author: halkazwini
77
ms.service: azure-frontdoor
88
ms.topic: how-to
9-
ms.date: 03/31/2024
10-
ms.custom:
11-
- build-2025
9+
ms.date: 07/02/2025
10+
ms.custom: devx-track-azurecli, build-2025
11+
zone_pivot_groups: front-door-dev-exp-portal-cli
1212
---
1313

1414
# Connect Azure Front Door Premium to a storage account origin with Private Link
1515

1616
**Applies to:** :heavy_check_mark: Front Door Premium
1717

18-
This article guides you through how to configure Azure Front Door Premium tier to connect to your storage account origin privately using the Azure Private Link service.
18+
This article guides you through configuring Azure Front Door Premium to connect privately to a storage account origin using Azure Private Link service.
1919

2020
## Prerequisites
2121

22-
* An Azure account with an active subscription. You can [create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
23-
* Create a [Private Link](../../private-link/create-private-link-service-portal.md) service for your origin web server.
22+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
2423

25-
## Sign in to Azure
24+
::: zone pivot="front-door-portal"
2625

27-
Sign in to the [Azure portal](https://portal.azure.com).
26+
- A Private Link. For more information, see [Create a Private Link service](../../private-link/create-private-link-service-portal.md) for your origin web server.
2827

29-
## Enable Private Link to a storage account
28+
- Sign in to the [Azure portal](https://portal.azure.com) with your Azure account.
29+
30+
::: zone-end
31+
32+
::: zone pivot="front-door-cli"
33+
34+
- A Private Link. For more information, see [Create a Private Link service](../../private-link/create-private-link-service-cli.md) for your origin web server.
35+
36+
- Azure Cloud Shell or Azure CLI.
37+
38+
The steps in this article run the Azure CLI commands interactively in [Azure Cloud Shell](/azure/cloud-shell/overview). To run the commands in the Cloud Shell, select **Open Cloud Shell** at the upper-right corner of a code block. Select **Copy** to copy the code, and paste it into Cloud Shell to run it. You can also run the Cloud Shell from within the Azure portal.
39+
40+
You can also [install Azure CLI locally](/cli/azure/install-azure-cli) to run the commands. If you run Azure CLI locally, sign in to Azure using the [az login](/cli/azure/reference-index#az-login) command.
41+
42+
::: zone-end
43+
44+
> [!NOTE]
45+
> Private endpoints require your Storage Account to meet specific requirements. For more information, see [Using Private Endpoints for Azure Storage](../../storage/common/storage-private-endpoints.md).
46+
47+
48+
## Enable Private Link to a storage account in Azure Front Door
49+
50+
::: zone pivot="front-door-portal"
3051

3152
In this section, you map the Private Link service to a private endpoint created in Azure Front Door's private network.
3253

33-
1. Within your Azure Front Door Premium profile, under *Settings*, select **Origin groups**.
54+
1. Within your Azure Front Door Premium profile, under **Settings**, select **Origin groups**.
3455

3556
1. Select the origin group that contains the storage account origin you want to enable Private Link for.
3657

3758
1. Select **+ Add an origin** to add a new storage account origin or select a previously created storage account origin from the list.
3859

39-
:::image type="content" source="../media/how-to-enable-private-link-storage-account/private-endpoint-storage-account.png" alt-text="Screenshot of enabling private link to a storage account.":::
40-
41-
1. The following table has information of what values to select in the respective fields while enabling private link with Azure Front Door. Select or enter the following settings to configure the storage blob you want Azure Front Door Premium to connect with privately.
60+
1. Select or enter the following values to configure the storage blob you want Azure Front Door Premium to connect with privately.
4261

4362
| Setting | Value |
4463
| ------- | ----- |
4564
| Name | Enter a name to identify this storage blog origin. |
46-
| Origin Type | Storage (Azure Blobs) |
65+
| Origin type | Storage (Azure Blobs) |
4766
| Host name | Select the host from the dropdown that you want as an origin. |
4867
| Origin host header | You can customize the host header of the origin or leave it as default. |
4968
| HTTP port | 80 (default) |
@@ -54,24 +73,75 @@ In this section, you map the Private Link service to a private endpoint created
5473
| Target sub resource | The type of subresource for the resource selected previously that your private endpoint can access. You can select *blob* or *web*. |
5574
| Request message | Custom message to see while approving the Private Endpoint. |
5675

57-
1. Then select **Add** to save your configuration. Then select **Update** to save the origin group settings.
76+
:::image type="content" source="../media/how-to-enable-private-link-storage-account/private-endpoint-storage-account.png" alt-text="Screenshot of enabling private link to a storage account.":::
77+
78+
1. Select **Add** to save your configuration.
79+
80+
1. Select **Update** to save the origin group settings.
5881

5982
> [!NOTE]
6083
> Ensure the **origin path** in your routing rule is configured correctly with the storage container file path so file requests can be acquired.
61-
>
6284
63-
## Approve private endpoint connection from the storage account
85+
::: zone-end
86+
87+
::: zone pivot="front-door-cli"
88+
89+
Use the [az afd origin create](/cli/azure/afd/origin#az-afd-origin-create) command to create a new Azure Front Door origin. The `private-link-location` value must be from the [available regions](../private-link.md#region-availability) and the `private-link-sub-resource-type` value is **blob**.
90+
91+
```azurecli-interactive
92+
az afd origin create --enabled-state Enabled \
93+
--resource-group 'myResourceGroup' \
94+
--origin-group-name 'og1' \
95+
--origin-name 'mystorageorigin' \
96+
--profile-name 'contosoAFD' \
97+
--host-name 'mystorage.blob.core.windows.net' \
98+
--origin-host-header 'mystorage.blob.core.windows.net' \
99+
--http-port 80 \
100+
--https-port 443 \
101+
--priority 1 \
102+
--weight 500 \
103+
--enable-private-link true \
104+
--private-link-location 'EastUS' \
105+
--private-link-request-message 'AFD storage origin Private Link request.' \
106+
--private-link-resource '/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorage' \
107+
--private-link-sub-resource-type blob
108+
```
109+
110+
::: zone-end
111+
112+
## Approve Front Door private endpoint connection from the storage account
113+
114+
::: zone pivot="front-door-portal"
64115

65-
1. Go to the storage account you configure Private Link for in the last section. Select **Networking** under **Settings**.
116+
1. Go to the storage account you configured Private Link for in the previous section.
117+
118+
1. Under **Settings**, select **Networking**.
66119

67120
1. In **Networking**, select **Private endpoint connections**.
68121

122+
1. Select the **pending** private endpoint request from Azure Front Door Premium then select **Approve**.
123+
124+
:::image type="content" source="../media/how-to-enable-private-link-storage-account/private-endpoint-pending-approval.png" alt-text="Screenshot of pending storage private endpoint request." lightbox="../media/how-to-enable-private-link-storage-account/private-endpoint-pending-approval.png":::
125+
126+
::: zone-end
127+
128+
::: zone pivot="front-door-cli"
129+
130+
1. Use the [az network private-endpoint-connection list](/cli/azure/network/private-endpoint-connection#az-network-private-endpoint-connection-list) command to list the private endpoint connections for your storage account. Note the `Resource ID` of the private endpoint connection from the output.
131+
132+
```azurecli-interactive
133+
az network private-endpoint-connection list --name 'mystorage' --resource-group 'myResourceGroup' --type 'Microsoft.Storage/storageAccounts'
134+
```
135+
136+
2. Use the [az network private-endpoint-connection approve](/cli/azure/network/private-endpoint-connection#az-network-private-endpoint-connection-approve) command to approve the private endpoint connection.
69137
70-
1. Select the *pending* private endpoint request from Azure Front Door Premium then select **Approve**.
138+
```azurecli-interactive
139+
az network private-endpoint-connection approve --id '/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorage/privateEndpointConnections/mystorage.aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e'
140+
```
71141
72-
:::image type="content" source="../media/how-to-enable-private-link-storage-account/private-endpoint-pending-approval.png" alt-text="Screenshot of pending storage private endpoint request.":::
142+
::: zone-end
73143
74-
1. Once approved, it should look like the following screenshot. It takes a few minutes for the connection to fully establish. You can now access your storage account from Azure Front Door Premium.
144+
It takes a few minutes for the connection to fully establish after approval. Once established, you can access your storage account privately through Azure Front Door Premium. Public internet access to the storage account is disabled once the private endpoint is enabled.
75145
76146
> [!NOTE]
77147
> If the blob or container within the storage account doesn't permit anonymous access, requests made against the blob/container should be authorized. One option for authorizing a request is by using [shared access signatures](../../storage/common/storage-sas-overview.md).
@@ -80,9 +150,10 @@ In this section, you map the Private Link service to a private endpoint created
80150
81151
The following are common mistakes when configuring an origin with Azure Private Link enabled:
82152
83-
* Adding the origin with Azure Private Link enabled 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.
84-
* Not using SAS tokens while connecting to storage account that does not allow anonymous access.
153+
- Adding the origin with Azure Private Link enabled 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.
154+
- Not using SAS tokens while connecting to storage account that doesn't allow anonymous access.
85155
86-
## Next steps
156+
## Related content
87157
88-
Learn about [Private Link service with storage account](../../storage/common/storage-private-endpoints.md).
158+
- [Connect Azure Front Door to an internal load balancer origin with Private Link](how-to-enable-private-link-internal-load-balancer.md)
159+
- [Private Link service with storage account](../../storage/common/storage-private-endpoints.md)

0 commit comments

Comments
 (0)