Hi William Menezes,
Thank you for reaching out on Microsoft Q&A forum
To help you with above blocker , please try to execute below steps:
From portal
- Please navigate to the Azure portal, go to Resource Groups, select the resource group that contains your private DNS zone, and then try to delete it from there.
- Sometimes accessing the resource from RG can help & can provide more detailed error messages.
- Please check any dependencies on custom roles or policies attached to the resource.
Via Power shell
- Instead of using
Remove-AzResource, which is generally for Azure resources , try using following command to delete a DNS zone, this command targets the DNS zone directly .
Remove-AzDnsZone -Name "private.acmecorp.com" -ResourceGroupName "az104-rg4"
- Sometimes resources get stuck in a failed state and cannot be deleted until its state is reset, so we can try a state reset which may trigger a new provisioning cycle and allow deletion afterward.
Use the following command to do above:
Set-AzPrivateDnsZone -ResourceGroupName "az104-rg4" -Name "private.acmecorp.com"
- Please find the below link for failed provisioning state referencehttps://learn.microsoft.com/en-us/azure/networking/troubleshoot-failed-state
Via CLI
We can also try to delete from azure CLI, please try below cmd to delete the resource.
az network private-dns zone delete --resource-group az104-rg4 --name private.acmecorp.com
If you find this comment helpful, please “up-vote” for the information provided , this can be beneficial to community members.
Kindly let us know if you have any additional questions.
Thanks