Skip to content

Commit 508b217

Browse files
author
Sudhakara Reddy Evuri
committed
Handled no extensions case for GetAzureDiskEncryptionStatus
1 parent c7cf3b3 commit 508b217

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ResourceManager/Compute/Commands.Compute/Extension/AzureDiskEncryption/GetAzureDiskEncryptionStatus.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ private bool ExtensionProvisioningSucceeded(AzureDiskEncryptionExtensionContext
9090

9191
private bool AreDataVolumesEncrypted(VirtualMachine vmParameters)
9292
{
93+
if(vmParameters == null || vmParameters.Extensions == null)
94+
{
95+
return false;
96+
}
97+
9398
foreach (VirtualMachineExtension vmExtension in vmParameters.Extensions)
9499
{
95100
if (IsAzureDiskEncryptionExtension(vmExtension))

0 commit comments

Comments
 (0)