Skip to content

Commit f571e09

Browse files
authored
Merge pull request #107061 from ShaneBala-keyvault/patch-1
Update private-link-service.md
2 parents 5aaf94a + b789125 commit f571e09

File tree

1 file changed

+77
-6
lines changed

1 file changed

+77
-6
lines changed

articles/key-vault/private-link-service.md

Lines changed: 77 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
title: Integrate with Azure Private Link Service
33
description: Learn how to integrate Azure Key Vault with Azure Private Link Service
4-
author: msmbaldwin
5-
ms.author: mbaldwin
6-
ms.date: 01/28/2020
4+
author: ShaneBala-keyvault
5+
ms.author: sudbalas
6+
ms.date: 03/08/2020
77
ms.service: key-vault
88
ms.topic: quickstart
99

1010
---
1111

12-
# Integrate Key Vault with Azure Private Link (Preview)
12+
# Integrate Key Vault with Azure Private Link
1313

1414
Azure Private Link Service enables you to access Azure Services (for example, Azure Key Vault, Azure Storage, and Azure Cosmos DB) and Azure hosted customer/partner services over a Private Endpoint in your virtual network.
1515

@@ -30,7 +30,7 @@ Your private endpoint and virtual network must be in the same region. When you s
3030

3131
Your private endpoint uses a private IP address in your virtual network.
3232

33-
## Establish a private link connection to key vault
33+
## Establish a private link connection to Key Vault using the Azure portal
3434

3535
First, create a virtual network by following the steps in [Create a virtual network using the Azure portal](../virtual-network/quick-create-portal.md)
3636

@@ -77,6 +77,60 @@ You can choose to create a private endpoint for any Azure resource in using this
7777
![Image](./media/private-link-service-3.png)
7878
![Image](./media/private-link-service-4.png)
7979

80+
## Establish a private link connection to Key Vault using CLI
81+
82+
### Login to Azure CLI
83+
```console
84+
az login
85+
```
86+
### Select your Azure Subscription
87+
```console
88+
az account set --subscription {AZURE SUBSCRIPTION ID}
89+
```
90+
### Create a new Resource Group
91+
```console
92+
az group create -n {RG} -l {AZURE REGION}
93+
```
94+
### Register Microsoft.KeyVault as a provider
95+
```console
96+
az provider register -n Microsoft.KeyVault
97+
```
98+
### Create a new Key Vault
99+
```console
100+
az keyvault create --name {KEY VAULT NAME} --resource-group {RG} --location {AZURE REGION}
101+
```
102+
### Create a Virtual Network
103+
```console
104+
az network vnet create --resource-group {RG} --name {vNet NAME} --location {AZURE REGION}
105+
```
106+
### Add a subnet
107+
```console
108+
az network vnet subnet create --resource-group {RG} --vnet-name {vNet NAME} --name {subnet NAME} --address-prefixes {addressPrefix}
109+
```
110+
### Disable Virtual Network Policies
111+
```console
112+
az network vnet subnet update --name {subnet NAME} --resource-group {RG} --vnet-name {vNet NAME} --disable-private-endpoint-network-policies true
113+
```
114+
### Add a Private DNS Zone
115+
```console
116+
az network private-dns zone create --resource-group {RG} --name privatelink.vaultcore.azure.net
117+
```
118+
### Link Private DNS Zone to Virtual Network
119+
```console
120+
az network private-dns link vnet create --resoruce-group {RG} --virtual-network {vNet NAME} --zone-name privatelink.vaultcore.azure.net --name {dnsZoneLinkName} --registration-enabled true
121+
```
122+
### Create a Private Endpoint (Automatically Approve)
123+
```console
124+
az network private-endpoint create --resource-group {RG} --vnet-name {vNet NAME} --subnet {subnet NAME} --name {Private Endpoint Name} --private-connection-resource-id "/subscriptions/{AZURE SUBSCRIPTION ID}/resourceGroups/{RG}/providers/Microsoft.KeyVault/vaults/ {KEY VAULT NAME}" --group-ids vault --connection-name {Private Link Connection Name} --location {AZURE REGION}
125+
```
126+
### Create a Private Endpoint (Manually Request Approval)
127+
```console
128+
az network private-endpoint create --resource-group {RG} --vnet-name {vNet NAME} --subnet {subnet NAME} --name {Private Endpoint Name} --private-connection-resource-id "/subscriptions/{AZURE SUBSCRIPTION ID}/resourceGroups/{RG}/providers/Microsoft.KeyVault/vaults/ {KEY VAULT NAME}" --group-ids vault --connection-name {Private Link Connection Name} --location {AZURE REGION} --manual-request
129+
```
130+
### Show Connection Status
131+
```console
132+
az network private-endpoint show --resource-group {RG} --name {Private Endpoint Name}
133+
```
80134
## Manage private link connection
81135

82136
When you create a private endpoint, the connection must be approved. If the resource for which you are creating a private endpoint is in your directory, you will be able to approve the connection request provided you have sufficient permissions; if you are connecting to an Azure resource in another directory, you must wait for the owner of that resource to approve your connection request.
@@ -90,7 +144,7 @@ There are four provisioning states:
90144
| Reject | Rejected | Connection was rejected by the private link resource owner. |
91145
| Remove | Disconnected | Connection was removed by the private link resource owner, the private endpoint becomes informative and should be deleted for cleanup. |
92146

93-
### How to manage a private endpoint connection to key vault
147+
### How to manage a private endpoint connection to Key Vault using the Azure portal
94148

95149
1. Log in to the Azure portal.
96150
1. In the search bar, type in "key vaults"
@@ -103,6 +157,23 @@ There are four provisioning states:
103157

104158
![Image](./media/private-link-service-7.png)
105159

160+
## How to manage a private endpoint connection to Key Vault using Azure CLI
161+
162+
### Approve a Private Link Connection Request
163+
```console
164+
az keyvault private-endpoint-connection approve --approval-description {"OPTIONAL DESCRIPTION"} --resource-group {RG} --vault-name {KEY VAULT NAME} –name {PRIVATE LINK CONNECTION NAME}
165+
```
166+
167+
### Deny a Private Link Connection Request
168+
```console
169+
az keyvault private-endpoint-connection reject --rejection-description {"OPTIONAL DESCRIPTION"} --resource-group {RG} --vault-name {KEY VAULT NAME} –name {PRIVATE LINK CONNECTION NAME}
170+
```
171+
172+
### Delete a Private Link Connection Request
173+
```console
174+
az keyvault private-endpoint-connection delete --resource-group {RG} --vault-name {KEY VAULT NAME} --name {PRIVATE LINK CONNECTION NAME}
175+
```
176+
106177
## Validate that the private link connection works
107178

108179
You should validate that the resources within the same subnet of the private endpoint resource are connecting to your key vault over a private IP address, and that they have the correct private DNS zone integration.

0 commit comments

Comments
 (0)