Skip to content

Commit 394f650

Browse files
authored
Merge pull request #218336 from khdownie/kendownie-xtcmk-portal
Adding portal to XTCMK for Disks
2 parents fafcaef + 6232f0f commit 394f650

File tree

2 files changed

+55
-40
lines changed

2 files changed

+55
-40
lines changed

articles/virtual-machines/disks-cross-tenant-customer-managed-keys.md

Lines changed: 55 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to use customer-managed keys with your Azure disks in dif
44
author: roygara
55
ms.service: storage
66
ms.topic: how-to
7-
ms.date: 11/11/2022
7+
ms.date: 11/30/2022
88
ms.author: rogarana
99
ms.subservice: disks
1010
---
@@ -29,13 +29,62 @@ If you have questions about cross-tenant customer-managed keys with managed disk
2929

3030
## Create a disk encryption set
3131

32-
Now that you've created your Azure Key Vault and performed the required Azure AD configurations, deploy a disk encryption set configured to work across tenants and associate it with a key in the key vault. You can do this using an ARM template, REST API, Azure PowerShell, or Azure CLI.
32+
Now that you've created your Azure Key Vault and performed the required Azure AD configurations, deploy a disk encryption set configured to work across tenants and associate it with a key in the key vault. You can do this using the Azure portal, Azure PowerShell, or Azure CLI. You can also use an [ARM template](#use-an-arm-template) or [REST API](#use-rest-api).
3333

34-
# [ARM/REST](#tab/azure-portal)
34+
# [Portal](#tab/azure-portal)
3535

36-
Use an ARM template or REST API.
36+
To use the Azure portal, sign in to the portal and follow these steps.
3737

38-
### ARM
38+
1. Select **+ Create a resource**, search for **Disk encryption set**, and select **Create > Disk encryption set**.
39+
1. Under **Project details**, select the subscription and resource group in which to create the disk encryption set.
40+
1. Under **Instance details**, provide a name for the disk encryption set.
41+
42+
:::image type="content" source="media/disks-cross-tenant-customer-managed-keys/create-disk-encryption-set.png" alt-text="Screenshot showing how to enter the project and instance details to create a new disk encryption set." border="true":::
43+
44+
1. Select the **Region** in which to create the disk encryption set.
45+
1. For **Encryption type**, select **Encryption at-rest with a customer-managed key**.
46+
1. Under **Encryption key**, select the **Enter key from URI** radio button, and then enter the Key URI of the key created in the customer's tenant.
47+
1. Under **User-assigned identity**, select **Select an identity**.
48+
1. Select the user-assigned managed identity that you created previously in the ISV's tenant, and then select **Add**.
49+
1. Under **Multi-tenant application**, select **Select an application**.
50+
1. Select the multi-tenant registered application that you created previously in the ISV's tenant, and click **Select**.
51+
1. Select **Review + create**.
52+
53+
# [PowerShell](#tab/azure-powershell)
54+
55+
To use Azure PowerShell, install the latest Az module or the Az.Storage module. For more information about installing PowerShell, see [Install Azure PowerShell on Windows with PowerShellGet](/powershell/azure/install-Az-ps).
56+
57+
[!INCLUDE [azure-powershell-requirements-no-header.md](../../includes/azure-powershell-requirements-no-header.md)]
58+
59+
In the script below, `-FederatedClientId` should be the application ID (client ID) of the multi-tenant application. You'll also need to provide the subscription ID, resource group name, and identity name.
60+
61+
```azurepowershell-interactive
62+
$userAssignedIdentities = @{"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" = @{}};
63+
64+
$config = New-AzDiskEncryptionSetConfig `
65+
-Location 'westcentralus' `
66+
-KeyUrl "https://vault1.vault.azure.net:443/keys/key1/mykey" `
67+
-IdentityType 'UserAssigned' `
68+
-RotationToLatestKeyVersionEnabled $True `
69+
-UserAssignedIdentity $userAssignedIdentities `
70+
-FederatedClientId "00000000-0000-0000-0000-000000000000" `
71+
$config `
72+
| New-AzDiskEncryptionSet -ResourceGroupName 'rg1' -Name 'enc1'
73+
```
74+
75+
# [Azure CLI](#tab/azure-cli)
76+
77+
[!INCLUDE [azure-cli-prepare-your-environment-no-header.md](../../includes/azure-cli-prepare-your-environment-no-header.md)]
78+
79+
In the command below, `myAssignedId` should be the resource ID of the user-assigned managed identity that you created earlier, and `myFederatedClientId` should be the application ID (client ID) of the multi-tenant application.
80+
81+
```azurecli-interactive
82+
az disk-encryption-set create --resource-group MyResourceGroup --name MyDiskEncryptionSet --key-url MyKey --mi-user-assigned myAssignedId --federated-client-id myFederatedClientId --location westcentralus
83+
```
84+
85+
---
86+
87+
### Use an ARM template
3988

4089
```json
4190
{
@@ -92,7 +141,7 @@ Use an ARM template or REST API.
92141
}
93142
```
94143

95-
### REST API
144+
### Use REST API
96145

97146
Use bearer token as authorization header and application/JSON as content type in BODY. (Network tab, filter to management.azure while performing any ARM request on portal.)
98147

@@ -123,40 +172,6 @@ Content-Type: application/json
123172
}
124173
```
125174

126-
# [PowerShell](#tab/azure-powershell)
127-
128-
To use Azure PowerShell, install the latest Az module or the Az.Storage module. For more information about installing PowerShell, see [Install Azure PowerShell on Windows with PowerShellGet](/powershell/azure/install-Az-ps).
129-
130-
[!INCLUDE [azure-powershell-requirements-no-header.md](../../includes/azure-powershell-requirements-no-header.md)]
131-
132-
In the script below, `-FederatedClientId` should be the application ID (client ID) of the multi-tenant application. You'll also need to provide the subscription ID, resource group name, and identity name.
133-
134-
```azurepowershell-interactive
135-
$userAssignedIdentities = @{"/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName" = @{}};
136-
137-
$config = New-AzDiskEncryptionSetConfig `
138-
-Location 'westcentralus' `
139-
-KeyUrl "https://vault1.vault.azure.net:443/keys/key1/mykey" `
140-
-IdentityType 'UserAssigned' `
141-
-RotationToLatestKeyVersionEnabled $True `
142-
-UserAssignedIdentity $userAssignedIdentities `
143-
-FederatedClientId "00000000-0000-0000-0000-000000000000" `
144-
$config `
145-
| New-AzDiskEncryptionSet -ResourceGroupName 'rg1' -Name 'enc1'
146-
```
147-
148-
# [Azure CLI](#tab/azure-cli)
149-
150-
[!INCLUDE [azure-cli-prepare-your-environment-no-header.md](../../includes/azure-cli-prepare-your-environment-no-header.md)]
151-
152-
In the command below, `myAssignedId` should be the resource ID of the user-assigned managed identity that you created earlier, and `myFederatedClientId` should be the application ID (client ID) of the multi-tenant application.
153-
154-
```azurecli-interactive
155-
az disk-encryption-set create --resource-group MyResourceGroup --name MyDiskEncryptionSet --key-url MyKey --mi-user-assigned myAssignedId --federated-client-id myFederatedClientId --location westcentralus
156-
```
157-
158-
---
159-
160175
## Next steps
161176

162177
See also:
39.5 KB
Loading

0 commit comments

Comments
 (0)