Hi zveratko
Thanks for using the Q&A platform.
You're encountering a common issue in Azure where a DDoS Protection Plan is still associated with a now-deleted VNet, and Azure won't let you delete the plan due to that ghost association.
Run the following Azure CLI to confirm which (if any) VNets are still linked:
az network ddos-protection show --name <ddos-plan-name> --resource-group <resource-group>
Look under the "virtualNetworks" section. If it shows a VNet that no longer exists, it means Azure still thinks it’s associated, even if it’s orphaned. However, if the output is empty, it is safe to delete.
You can try using the following command:
az network ddos-protection delete \
--name <ddos-plan-name> \
--resource-group <resource-group>
Find additional documentation: https://learn.microsoft.com/en-us/cli/azure/network/ddos-protection?view=azure-cli-latest
If Azure still won't allow you to delete the DDoS plan because it thinks a VNet is attached, even though it's gone, you will need to open a Microsoft support ticket to remove orphaned associations on the backend.
If the response was helpful, please feel free to mark it as “Accepted Answer” and consider giving it an upvote. This also benefits others in the community.
Regards,
Obinna.