Allow to delete NSG Flow if subnet has been deleted
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### Describe the bug
If a subnet is deleted and an NSG flow log is linked to it, the flow log cannot be deleted.
Whether via the Azure portal or the Azure CLI
I've tried deleting only the flow log, only the region watcher, deleting the resource group. Nothing works.
### Related command
az network watcher flow-log delete --name xxxxxxx --location xxxxxx
### Errors
(SubnetNotFoundForFlowLog) Subnet resource /subscriptions/xxxxxxx/resourceGroups/xxxxxxx/providers/Microsoft.Network/VirtualNetworks/xxxxxxx/subnets/xxxxxxx passed for the flow log does not exist.
Code: SubnetNotFoundForFlowLog
Message: Subnet resource /subscriptions/xxxxxxxx/resourceGroups/xxxxxx/providers/Microsoft.Network/VirtualNetworks/VirtualNetworks/xxxxxxx/subnets/xxxxxxx passed for the flow log does not exist.
### Issue script & Debug output
/
### Expected behavior
Allow to delete NSG Flow if subnet has been deleted
### Environment Summary
azure-cli 2.73.0
core 2.73.0
telemetry 1.1.0
Extensions:
containerapp 1.1.0b4
rdbms-connect 1.0.7
serviceconnector-passwordless 3.3.1
Dependencies:
msal 1.32.3
azure-mgmt-resource 23.3.0
Python location '/opt/homebrew/Cellar/azure-cli/2.73.0/libexec/bin/python'
Config directory '/Users/***/.azure'
Extensions directory '/Users/***/.azure/cliextensions'
Python (Darwin) 3.12.10 (main, Apr 8 2025, 11:35:47) [Clang 16.0.0 (clang-1600.0.26.6)]
Legal docs and information: aka.ms/AzureCliLegal
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.