From 704d212b40912a18c5baebe172f9c665a1d64319 Mon Sep 17 00:00:00 2001 From: Simone Savi <16479009+simonesavi@users.noreply.github.com> Date: Wed, 5 Feb 2020 08:49:13 +0100 Subject: [PATCH 1/3] Update example to insert missing parameter The procedure provided in example work only for OS. If you try to use the same command for data disk, mounting operation in Virtual Machine will fail. The fix it was discovered during an analysis with product group. --- src/Compute/Compute/help/Set-AzDiskDiskEncryptionKey.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Compute/Compute/help/Set-AzDiskDiskEncryptionKey.md b/src/Compute/Compute/help/Set-AzDiskDiskEncryptionKey.md index ec48b898039a..08cb21217a83 100644 --- a/src/Compute/Compute/help/Set-AzDiskDiskEncryptionKey.md +++ b/src/Compute/Compute/help/Set-AzDiskDiskEncryptionKey.md @@ -31,6 +31,7 @@ PS C:\> $keyUrl = https://myvault.vault-int.azure-int.net/keys/456; PS C:\> $keyId = '/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Microsoft.KeyVault/vaults/TestVault456'; PS C:\> $diskconfig = Set-AzDiskDiskEncryptionKey -Disk $diskconfig -SecretUrl $secretUrl -SourceVaultId $secretId; PS C:\> $diskconfig = Set-AzDiskKeyEncryptionKey -Disk $diskconfig -KeyUrl $keyUrl -SourceVaultId $keyId; +PS C:\> $diskConfig.EncryptionSettingsCollection.EncryptionSettingsVersion = '1.1'; PS C:\> New-AzDisk -ResourceGroupName 'ResourceGroup01' -DiskName 'Disk01' -Disk $diskconfig; ``` From 517efd839ca1b0a5cbb17989109be159b5fd4218 Mon Sep 17 00:00:00 2001 From: Simone Savi <16479009+simonesavi@users.noreply.github.com> Date: Wed, 5 Feb 2020 09:11:01 +0100 Subject: [PATCH 2/3] Update the example inserting a missing parameter Provided example works only for OS disk. If you try to mount a data disk with this configuration, the operation fail. With setting inserted in example the problem is solved. The solution it was an outcome of an analysis done with Product Group --- src/Compute/Compute/help/Set-AzDiskKeyEncryptionKey.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Compute/Compute/help/Set-AzDiskKeyEncryptionKey.md b/src/Compute/Compute/help/Set-AzDiskKeyEncryptionKey.md index 0b399b051502..ae266440b870 100644 --- a/src/Compute/Compute/help/Set-AzDiskKeyEncryptionKey.md +++ b/src/Compute/Compute/help/Set-AzDiskKeyEncryptionKey.md @@ -31,6 +31,7 @@ PS C:\> $keyUrl = https://myvault.vault-int.azure-int.net/keys/456; PS C:\> $keyId = '/subscriptions/0000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Microsoft.KeyVault/vaults/TestVault456'; PS C:\> $diskconfig = Set-AzDiskDiskEncryptionKey -Disk $diskconfig -SecretUrl $secretUrl -SourceVaultId $secretId; PS C:\> $diskconfig = Set-AzDiskKeyEncryptionKey -Disk $diskconfig -KeyUrl $keyUrl -SourceVaultId $keyId; +PS C:\> $diskconfig.EncryptionSettingsCollection.EncryptionSettingsVersion = '1.1'; PS C:\> New-AzDisk -ResourceGroupName 'ResourceGroup01' -DiskName 'Disk01' -Disk $diskconfig; ``` From 0b7c981f4f929b7b05a43334061b20aebae6f6b0 Mon Sep 17 00:00:00 2001 From: Simone Savi <16479009+simonesavi@users.noreply.github.com> Date: Wed, 5 Feb 2020 09:33:38 +0100 Subject: [PATCH 3/3] Inserted change log update Fix broken example code for 'Set-AzDiskDiskEncryptionKey' and 'Set-AzDiskKeyEncryptionKey' --- src/Compute/Compute/ChangeLog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Compute/Compute/ChangeLog.md b/src/Compute/Compute/ChangeLog.md index 6433daee9014..ef730b32f162 100644 --- a/src/Compute/Compute/ChangeLog.md +++ b/src/Compute/Compute/ChangeLog.md @@ -28,6 +28,7 @@ - New-AzDiskUpdateConfig, New-AzSnapshotUpdateConfig * Add ColocationStatus parameter to Get-AzProximityPlacementGroup cmdlet. * Fix broken example code for 'Revoke-AzSnapshotAccess' and 'Grant-AzSnapshotAccess' +* Fix broken example code for 'Set-AzDiskDiskEncryptionKey' and 'Set-AzDiskKeyEncryptionKey' ## Version 3.3.0 * Fix Set-AzVMCustomScriptExtension cmdlet for a VM with managed OD disk which does not have OS profile.