in azure you can erase disks using Azure Storage Explorer.
If you have a deleted virtual machine and the disks report that they are attached and the command gives you an error:
Remove-AzDisk -ResourceGroupName $resourcegroup -DiskName -Force
output:
Remove-AzDisk: Disk vmname_OsDisk_1_c2116### is attached to VM /subscriptions/###/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vmname.
ErrorCode: OperationNotAllowed
ErrorMessage: Disk /subscriptions/###/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vmname.
ErrorTarget:
StatusCode: 409
ReasonPhrase: Conflict
OperationID : 34731d70-2f9e-4ad1-8eec-4fcb6f55fbd0
you can create a generation 1 server to test on the same resource group with the same bug name.
with this you make the "Resource ID" exist for the virtual machine,
and you can now erase the disk by Azure Storage Explorer normally.
This is because Azure does a validation prior to deletion and if the disk is attached, the VM must exist.
delete
functionality will appear to be disabled. In the time it took me to read through the answers in this post, the disk disappeared on it's own. – Butterfingers