-
Notifications
You must be signed in to change notification settings - Fork 3.4k
az network manager resources delete behavior #23707
Copy link
Copy link
Closed
Azure/azure-cli-extensions
#5285Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamNetworkaz network vnet/lb/nic/dns/etc...az network vnet/lb/nic/dns/etc...questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Metadata
Metadata
Assignees
Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamNetworkaz network vnet/lb/nic/dns/etc...az network vnet/lb/nic/dns/etc...questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Related command
az network manager delete --force
az network manager group delete --force
az network manager connect-config delete --force
az network manager security-admin-config delete --force
az network manager security-admin-config rule-collection delete --force
az network manager security-admin-config rule-collection rule delete --force
Describe the bug
When deleting any of these resources, if no '--force' parameter is provided, the request will still delete with 'force' behavior.
To Reproduce
Create one of these resources above, deploy it using 'az network manager --post-commit', and then try to delete the resource with no '--force' flag. Ideally the delete will fail because the resource is actively deployed, but instead it will succeed.
Expected behavior
For each of these delete commands, we offer a force delete flag option '--force'. If the force flag is present, we add '&force=true' param to the request uri, and if the force flag is not present, we do not add any param. However, our backend will treat no flag as 'force=true', so if no flag is passed we need to explicitly add '&force=false'.
Environment summary
Additional context