Describe the bug
When executing az vm create with the --nic-delete-option delete and --os-disk-delete-option delete, an az vm delete will remove NIC and OS-disk but not the public IP and NSG associated with the NIC.
To Reproduce
g=group$RANDOM
n=vm$RANDOM
az group create -g $g -l eastus
az vm create -g $g -n $n --image ... --nic-delete-option delete --os-disk-delete-option delete
az vm delete -g $g -n $n
az resource list -g $g -o table
# NSG and public IP resources left behind
Expected behavior
Expected resources associated with NIC to be deleted along with it.
Environment summary
apt-get, from packages.microsoft.com.
azure-cli 2.35.0
Ubuntu 21.10
Additional context
Describe the bug
When executing
az vm createwith the--nic-delete-option deleteand--os-disk-delete-option delete, anaz vm deletewill remove NIC and OS-disk but not the public IP and NSG associated with the NIC.To Reproduce
Expected behavior
Expected resources associated with NIC to be deleted along with it.
Environment summary
apt-get, from packages.microsoft.com.
azure-cli 2.35.0
Ubuntu 21.10
Additional context