Az delete resource items
Jump to navigation
Jump to search
#!/bin/bash set -eu RG=MYRG disks=( buskTest-z1 busktest1_OsDisk_1_b810a839f33c41b2853a25f5b61ebc47 ) nics=( buskTestVMNic ) delete_disks(){ for disk in "${disks[@]}"; do echo deleting disk $disk in 5 seconds; sleep 5 az disk delete --resource-group $RG --name $disk --yes done } delete_nics(){ for nic in "${nics[@]}"; do echo deleting nic $nic in 5 seconds; sleep 5 az network nic delete --resource-group $RG --name $nic done } main(){ delete_nics delete_disks } main