Skip to content

Commit 87395fa

Browse files
Merge pull request #232020 from naioja/aj_disk_enc
Disk encryption minor changes
2 parents 663f4f2 + aab946c commit 87395fa

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

includes/virtual-machines-disks-encryption-create-key-vault-cli.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
author: roygara
66
ms.service: virtual-machines
77
ms.topic: include
8-
ms.date: 03/15/2022
8+
ms.date: 03/31/2023
99
ms.author: rogarana
1010
ms.custom: include file, devx-track-azurecli
1111
---
@@ -30,11 +30,13 @@ diskName=yourDiskName
3030
3131
az account set --subscription $subscriptionId
3232
33+
az group create --resource-group $rgName --location $location
34+
3335
az keyvault create -n $keyVaultName \
3436
-g $rgName \
3537
-l $location \
3638
--enable-purge-protection true
37-
39+
3840
az keyvault key create --vault-name $keyVaultName \
3941
-n $keyName \
4042
--protection software
@@ -45,7 +47,7 @@ az keyvault key create --vault-name $keyVaultName \
4547
```azurecli
4648
keyVaultKeyUrl=$(az keyvault key show --vault-name $keyVaultName --name $keyName --query [key.kid] -o tsv)
4749
48-
az disk-encryption-set create -n $diskEncryptionSetName
50+
az disk-encryption-set create -n $diskEncryptionSetName \
4951
-l $location \
5052
-g $rgName \
5153
--key-url $keyVaultKeyUrl \
@@ -101,7 +103,7 @@ Then, create a DiskEncryptionSet.
101103
```azurecli
102104
keyVaultKeyUrl=$(az keyvault key show --vault-name $keyVaultName --name $keyName --query [key.kid] -o tsv)
103105
104-
az disk-encryption-set create -n $diskEncryptionSetName
106+
az disk-encryption-set create -n $diskEncryptionSetName \
105107
-l $location \
106108
-g $rgName \
107109
--key-url $keyVaultKeyUrl \

0 commit comments

Comments
 (0)