-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
az feedbackauto-generates most of the information requested below, as of CLI version 2.0.62
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
C:\CLI_test\azure-cli-extensions>az --version
azure-cli 2.39.0
core 2.39.0
telemetry 1.0.6 *
Extensions:
account 0.2.1
azure-devops 0.18.0
virtual-network-manager 0.5.2
network-manager Unknown (dev) C:\CLI_test\azure-cli-extensions\src\network-manager
Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1
Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\jaredgorthy\.azure\cliextensions'
Development extension sources:
C:\CLI_test\azure-cli-extensions
Python (Windows) 3.10.5 (tags/v3.10.5:f377153, Jun 6 2022, 15:58:59) [MSC v.1929 32 bit (Intel)]
Additional context