~/azure-bicep-reference — bash
# Ch4 teardown: delete YOUR lab storage account (not the whole resource group)
# Nested blob container goes with the account
$ export CLASS_RG=rg-hyf-students
$ az storage account show -g "$CLASS_RG" -n sthyfyourname --query name -o tsv
sthyfyourname
$ az resource delete \
--resource-group "$CLASS_RG" \
--name sthyfyourname \
--resource-type Microsoft.Storage/storageAccounts
# Success is silent: no JSON, just exit code 0
$ az storage account show -g "$CLASS_RG" -n sthyfyourname
ERROR: (ResourceNotFound) The Resource 'Microsoft.Storage/storageAccounts/sthyfyourname'
under resource group 'rg-hyf-students' was not found.
# ResourceNotFound = teardown worked
# Confirm the same absence in the portal under rg-hyf-students
# Remember: removing a line from Bicep does NOT delete Azure —
# you delete the live resource explicitly like this