Skip to content

Commit d023518

Browse files
Fixed a bug for Remove-AzVmssDataDisk in one data disk case (#14553)
* bug fix * changelog edit
1 parent 36d8201 commit d023518

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/Compute/Compute/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
2121
-->
2222
## Upcoming Release
23+
* Fixed a bug when 1 data disk attached to VMSS for Remove-AzVmssDataDisk [#13368]
2324

2425
## Version 4.10.0
2526
* Added parameter `-EnableHotpatching` to the `Set-AzVMOperatingSystem` cmdlet for Windows machines.

src/Compute/Compute/Generated/VirtualMachineScaleSet/Config/RemoveAzureRmVmssDataDiskCommand.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,6 @@ protected override void ProcessRecord()
8888
this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile.DataDisks.Remove(vDataDisks);
8989
}
9090

91-
if (this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile.DataDisks.Count == 0)
92-
{
93-
this.VirtualMachineScaleSet.VirtualMachineProfile.StorageProfile.DataDisks = null;
94-
}
9591
WriteObject(this.VirtualMachineScaleSet);
9692
}
9793
}

0 commit comments

Comments
 (0)