You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Applies to:**:heavy_check_mark: Linux VMs :heavy_check_mark: Flexible scale sets
16
16
17
-
Azure Disk Storage supports double encryption at rest for managed disks. For conceptual information on double encryption at rest, as well as other managed disk encryption types, see the [Double encryption at rest](../disk-encryption.md#double-encryption-at-rest) section of our disk encryption article.
17
+
Azure Disk Storage supports double encryption at rest for managed disks. For conceptual information on double encryption at rest, and other managed disk encryption types, see the [Double encryption at rest](../disk-encryption.md#double-encryption-at-rest) section of our disk encryption article.
18
18
19
19
## Prerequisites
20
20
21
-
Install the latest [Azure CLI](/cli/azure/install-az-cli2) and log in to an Azure account with [az login](/cli/azure/reference-index).
21
+
Install the latest [Azure CLI](/cli/azure/install-az-cli2) and sign in to an Azure account with [az login](/cli/azure/reference-index).
22
22
23
23
## Getting started
24
24
25
25
1. Create an instance of Azure Key Vault and encryption key.
26
26
27
-
When creating the Key Vault instance, you must enable soft delete and purge protection. Soft delete ensures that the Key Vault holds a deleted key for a given retention period (90 day default). Purge protection ensures that a deleted key cannot be permanently deleted until the retention period lapses. These settings protect you from losing data due to accidental deletion. These settings are mandatory when using a Key Vault for encrypting managed disks.
27
+
When creating the Key Vault instance, you must enable soft delete and purge protection. Soft delete ensures that the Key Vault holds a deleted key for a given retention period (90 day default). Purge protection ensures that a deleted key can't be permanently deleted until the retention period lapses. These settings protect you from losing data due to accidental deletion. These settings are mandatory when using a Key Vault for encrypting managed disks.
28
28
29
29
30
30
```azurecli
@@ -43,12 +43,16 @@ Install the latest [Azure CLI](/cli/azure/install-az-cli2) and log in to an Azur
43
43
az keyvault key create --vault-name $keyVaultName -n $keyName --protection software
44
44
```
45
45
46
-
1. Create a DiskEncryptionSet with encryptionType set as EncryptionAtRestWithPlatformAndCustomerKeys. Use API version **2020-05-01** in the Azure Resource Manager (ARM) template.
46
+
1. Get the key URL of the key you created with `az keyvault key show`.
47
+
48
+
```azurecli
49
+
az keyvault key show --name $keyName --vault-name $keyVaultName
50
+
```
51
+
52
+
1. Create a DiskEncryptionSet with encryptionType set as EncryptionAtRestWithPlatformAndCustomerKeys. Replace `yourKeyURL` with the URL you received from `az keyvault key show`.
description: Enable double encryption at rest for your managed disk data using Azure PowerShell.
4
4
author: roygara
5
5
6
-
ms.date: 06/29/2021
6
+
ms.date: 01/20/2023
7
7
ms.topic: how-to
8
8
ms.author: rogarana
9
9
ms.service: storage
@@ -15,7 +15,7 @@ ms.custom: references_regions
15
15
16
16
**Applies to:**:heavy_check_mark: Windows VMs
17
17
18
-
Azure Disk Storage supports double encryption at rest for managed disks. For conceptual information on double encryption at rest, as well as other managed disk encryption types, see the [Double encryption at rest](../disk-encryption.md#double-encryption-at-rest) section of our disk encryption article.
18
+
Azure Disk Storage supports double encryption at rest for managed disks. For conceptual information on double encryption at rest, and other managed disk encryption types, see the [Double encryption at rest](../disk-encryption.md#double-encryption-at-rest) section of our disk encryption article.
19
19
20
20
## Prerequisites
21
21
@@ -25,7 +25,7 @@ Install the latest [Azure PowerShell version](/powershell/azure/install-az-ps),
25
25
26
26
1. Create an instance of Azure Key Vault and encryption key.
27
27
28
-
When creating the Key Vault instance, you must enable soft delete and purge protection. Soft delete ensures that the Key Vault holds a deleted key for a given retention period (90 day default). Purge protection ensures that a deleted key cannot be permanently deleted until the retention period lapses. These settings protect you from losing data due to accidental deletion. These settings are mandatory when using a Key Vault for encrypting managed disks.
28
+
When creating the Key Vault instance, you must enable soft delete and purge protection. Soft delete ensures that the Key Vault holds a deleted key for a given retention period (90 day default). Purge protection ensures that a deleted key can't be permanently deleted until the retention period lapses. These settings protect you from losing data due to accidental deletion. These settings are mandatory when using a Key Vault for encrypting managed disks.
29
29
30
30
```powershell
31
31
$ResourceGroupName="yourResourceGroupName"
@@ -40,16 +40,24 @@ Install the latest [Azure PowerShell version](/powershell/azure/install-az-ps),
1. Create a DiskEncryptionSet with encryptionType set as EncryptionAtRestWithPlatformAndCustomerKeys. Use API version **2020-05-01** in the Azure Resource Manager (ARM) template.
43
+
1. Retrieve the URL for the key you created, you'll need it for subsequent commands. The ID output from `Get-AzKeyVaultKey` is the key URL.
1. Get the resource ID for the Key Vault instance you created, you'll need it for subsequent commands.
50
+
51
+
```powershell
52
+
Get-AzKeyVault -VaultName $keyVaultName
53
+
```
54
+
55
+
1. Create a DiskEncryptionSet with encryptionType set as EncryptionAtRestWithPlatformAndCustomerKeys. Replace `yourKeyURL` and `yourKeyVaultURL` with the URLs you retrieved earlier.
0 commit comments