Skip to content

Commit 345fb77

Browse files
authored
Merge pull request #203424 from darkoa-msft/master
Documented Private Endpoint and Service Tag usage in Device Update for IoT Hub
2 parents 3cb5770 + dd9c9e7 commit 345fb77

14 files changed

+367
-135
lines changed
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
---
2+
title: Configure private endpoints for Device Update for IoT Hub accounts
3+
description: This article describes how to configure private endpoints for Device Update for IoT Hub account.
4+
author: darkoa-msft
5+
ms.author: darkoa
6+
ms.date: 06/26/2022
7+
ms.topic: how-to
8+
ms.service: iot-hub-device-update
9+
ms.custom: devx-track-azurecli, devx-track-azurepowershell
10+
---
11+
12+
# Configure private endpoints for Device Update for IoT Hub accounts
13+
You can use [private endpoints](../private-link/private-endpoint-overview.md) to allow traffic directly from your virtual network to your account securely over a [private link](../private-link/private-link-overview.md) without going through the public internet. The private endpoint uses an IP address from the VNet address space for your account. For more conceptual information, see [Network security](network-security.md).
14+
15+
This article describes how to configure private endpoints for accounts.
16+
17+
## Use Azure portal
18+
This section shows you how to use the Azure portal to create a private endpoint for an account.
19+
20+
### Auto-approved Private Endpoints
21+
22+
A connection can be auto-approved only if the user creating a connection also has access to the Device Update account.
23+
24+
1. Sign in to the [Azure portal](https://portal.azure.com) and navigate to your account or domain.
25+
2. Switch to the **Networking** tab of your account page. If you want to limit the access to only the private endpoint, disable the **Public Network Access**.
26+
:::image type="content" source="./media/configure-private-endpoints/device-update-networking-tab.png" alt-text="Screenshot that shows the Device Update Networking tab.":::
27+
3. Switch to the **Private Access** tab, and then select **+ Add** on the toolbar.
28+
4. On the **Basics** page, follow these steps:
29+
1. Select an **Azure subscription** in which you want to create the private endpoint.
30+
2. Select an **Azure resource group** for the private endpoint.
31+
3. Enter a **name** for the endpoint (this will auto-generate NIC name).
32+
4. Select the **region** for the endpoint. Your private endpoint must be in the same region as your virtual network, but can in a different region from the private link resource (in this example, a Device Update account).
33+
:::image type="content" source="./media/configure-private-endpoints/device-update-pec-create-01.png" alt-text="Screenshot showing the Basics page of the Create a private endpoint wizard.":::
34+
5. The **Resource** page is auto-populated
35+
:::image type="content" source="./media/configure-private-endpoints/device-update-pec-create-02.png" alt-text="Screenshot showing the Resource page of the Create a private endpoint wizard.":::
36+
6. On the **Virtual Network** page, you select the subnet in a virtual network to where you want to deploy the private endpoint.
37+
1. Select a **virtual network**. Only virtual networks in the currently selected subscription and location are listed in the drop-down list.
38+
2. Select a **subnet** in the virtual network you selected.
39+
:::image type="content" source="./media/configure-private-endpoints/device-update-pec-create-03.png" alt-text="Screenshot showing the Virtual Network page of the Creating a private endpoint wizard.":::
40+
7. On the **DNS** page, unless you're using your own custom DNS, use the pre-populated values.
41+
:::image type="content" source="./media/configure-private-endpoints/device-update-pec-create-04.png" alt-text="Screenshot showing the DNS page of the Creating a private endpoint wizard.":::
42+
8. On the **Tags** page, create any tags (names and values) that you want to associate with the private endpoint resource. Then, select **Review + create** button at the bottom of the page.
43+
9. On the **Review + create**, review all the settings, and select **Create** to create the private endpoint.
44+
45+
### Manually approved Private Endpoints
46+
47+
In the case that the user creating the connection doesn't have the power to also approve it, the connection will be created in the pending state.
48+
49+
1. Go to Home -> Private Link Center -> Private Endpoints -> +Create
50+
:::image type="content" source="./media/configure-private-endpoints/private-link-center.png" alt-text="Screenshot showing the Private Endpoints tab in Private Link Center.":::
51+
2. On the **Basics** page, follow these steps (same as in **Networking** tab in the Device Update account above):
52+
1. Select an **Azure subscription** in which you want to create the private endpoint.
53+
2. Select an **Azure resource group** for the private endpoint.
54+
3. Enter a **name** for the endpoint.
55+
4. Select the **region** for the endpoint. Your private endpoint must be in the same region as your virtual network, but can in a different region from the private link resource (in this example, a Device Update account).
56+
5. Then, select **Next: Resource >** button at the bottom of the page.
57+
3. Fill all the required fields on the **Resources** tab
58+
1. Select **Connect by Resource ID**.
59+
2. Enter the Resource ID of the Device Update account.
60+
3. Target sub-resource value must be **DeviceUpdate**
61+
4. Optionally, add a request message
62+
:::image type="content" source="./media/configure-private-endpoints/private-endpoint-manual-create.png" alt-text="Screenshot showing the Resource page of the Create a private endpoint tab in Private Link Center.":::
63+
4. Complete the rest of the steps like in steps 6-9 above
64+
65+
### Manage private link connection
66+
67+
When you create a private endpoint awaiting the manual approval, the connection must be approved before it can be used. If the resource for which you're creating a private endpoint is in your directory, you can approve the connection request provided you have sufficient permissions. If you're connecting to an Azure resource in another directory, you must wait for the owner of that resource to approve your connection request.
68+
69+
There are four provisioning states:
70+
71+
| Service action | Service consumer private endpoint state | Description |
72+
|--|--|--|
73+
| None | Pending | Connection is created manually and is pending approval from the private Link resource owner. |
74+
| Approve | Approved | Connection was automatically or manually approved and is ready to be used. |
75+
| Reject | Rejected | Connection was rejected by the private link resource owner. |
76+
| Remove | Disconnected | Connection was removed by the private link resource owner, the private endpoint becomes informative and should be deleted for cleanup. |
77+
78+
### How to manage a private endpoint connection
79+
The following sections show you how to approve or reject a private endpoint connection.
80+
81+
#### Approve or reject a pending connection from the Private Link Center
82+
83+
1. Go to Home -> Private Link Center -> Pending Connections
84+
2. Select the connection and approve/reject
85+
:::image type="content" source="./media/configure-private-endpoints/private-link-approval.png" alt-text="Screenshot showing the Pending Connections tab in Private Link Center.":::
86+
87+
#### Approve or reject a pending connection from the Device Update account
88+
89+
1. Sign in to the [Azure portal](https://portal.azure.com).
90+
2. In the search bar, type in **Device Update account**.
91+
3. Select the **account** that you want to manage.
92+
4. Select the **Networking** tab.
93+
5. If there are any connections that are pending, you'll see a connection listed with **Pending** in the provisioning state.
94+
:::image type="content" source="./media/configure-private-endpoints/device-update-approval.png" alt-text="Screenshot showing a Pending Connection in the Networking tab in Device Update account.":::
95+
96+
## Use Azure CLI
97+
98+
### Create a private endpoint
99+
100+
To create a private endpoint, use the [az network private-endpoint create](/cli/azure/network/private-endpoint?#az-network-private-endpoint-create) method as shown in the following example:
101+
102+
```azurecli-interactive
103+
az network private-endpoint create \
104+
-g <RESOURCE GROUP NAME> \
105+
-n <PRIVATE ENDPOINT NAME> \
106+
--vnet-name <VIRTUAL NETWORK NAME> \
107+
--subnet <SUBNET NAME> \
108+
--private-connection-resource-id "/subscriptions/<SUBSCRIPTION ID>/resourceGroups/<RESOURCE GROUP NAME>/providers/Microsoft.DeviceUpdate/account/<ACCOUNT NAME> \
109+
--connection-name <PRIVATE LINK SERVICE CONNECTION NAME> \
110+
--location <LOCATION> \
111+
--group-id DeviceUpdate
112+
--request-message "Optional message"
113+
--manual-request
114+
```
115+
116+
For descriptions of the parameters used in the example, see documentation for [az network private-endpoint create](/cli/azure/network/private-endpoint?#az-network-private-endpoint-create). A few points to note in this example are:
117+
118+
- For `private-connection-resource-id`, specify the resource ID of the **account**.
119+
- For `group-id`, specify `DeviceUpdate`.
120+
121+
To delete a private endpoint, use the [az network private-endpoint delete](/cli/azure/network/private-endpoint?#az-network-private-endpoint-delete) method as shown in the following example:
122+
123+
```azurecli-interactive
124+
az network private-endpoint delete -g <RESOURCE GROUP NAME> -n <PRIVATE ENDPOINT NAME>
125+
```
126+
127+
### Approve/reject a private endpoint connection
128+
129+
```azurecli-interactive
130+
az iot device-update account private-endpoint-connection set \
131+
-n <ACCOUNT NAME> \
132+
--cn <PRIVATE LINK SERVICE CONNECTION NAME> \
133+
--status <Approved/Rejected> \
134+
--desc 'Optional description'
135+
```
136+
137+
138+
## Next steps
139+
140+
* [Learn about network security concepts](network-security.md).
31.7 KB
Loading
41 KB
Loading
41.4 KB
Loading
38.4 KB
Loading
54.7 KB
Loading
38.9 KB
Loading
38.7 KB
Loading
38.6 KB
Loading
49.2 KB
Loading

0 commit comments

Comments
 (0)