Skip to content

Commit de9479c

Browse files
committed
add cli instructions to first two sections
1 parent 2d14bac commit de9479c

File tree

1 file changed

+54
-5
lines changed

1 file changed

+54
-5
lines changed

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

Lines changed: 54 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'Connect Azure Front Door to a Storage Account Origin with Private Link'
2+
title: Connect Azure Front Door to a Storage Account Origin
33
titleSuffix: Azure Private Link
44
description: Learn how to connect your Azure Front Door Premium to a storage account privately with Azure Private Link.
55
author: halkazwini
@@ -15,17 +15,39 @@ zone_pivot_groups: front-door-dev-exp-portal-cli
1515

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

18-
This article guides you through configuring Azure Front Door Premium to connect privately to a storage account origin using Azure Private Link service. You'll learn how to set up and approve the private endpoint connection, ensuring secure communication between Front Door and your storage resources.
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

2222
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
2323

24-
- Sign in to the [Azure portal](https://portal.azure.com) with your Azure account.
24+
::: zone pivot="front-door-portal"
2525

2626
- 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.
2727

28-
## 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"
2951

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

@@ -35,7 +57,7 @@ In this section, you map the Private Link service to a private endpoint created
3557

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

38-
1. 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.
3961

4062
| Setting | Value |
4163
| ------- | ----- |
@@ -60,6 +82,33 @@ In this section, you map the Private Link service to a private endpoint created
6082
> [!NOTE]
6183
> Ensure the **origin path** in your routing rule is configured correctly with the storage container file path so file requests can be acquired.
6284
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+
63112
## Approve private endpoint connection from the storage account
64113

65114
1. Go to the storage account you configured Private Link for in the previous section.

0 commit comments

Comments
 (0)