Azure / azure-cli

Azure Command-Line Interface
MIT License
3.91k stars 2.88k forks source link

az network firewall create accepts duplicate firewall name #24892

Open Gizachew-Eshetie opened 1 year ago

Gizachew-Eshetie commented 1 year ago

Related command

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

az network firewall create --name test --resource-group CMP --location centralindia --tier Standard --vnet-name CMP-VNET

Describe the bug

CLI is not prompting for any message(error/waning) while creating a new Firewall (with same name as the one existing in Resource Group already), and updates the current Firewall which is big risk to Production environment.

Can we include some sort of validation when deploying via CLI or make sure the deployment for same name ends up in error (call coming via CLI in NRP should get failed).

We are able to reproduce the issue in our labs. Powershell does give some warning and Portal gives error while configuring.

To Reproduce

-Tested the same in our lab and it overrides with same name wherein it should throw an error.

az network firewall create -g RG-SI -n MyFirewall --private-ranges 10.0.0.0 10.0.0.0/16 IANAPrivateRanges

az network firewall create -g RG-SI -n MyFirewall --private-ranges 20.0.0.0 20.0.0.0/16 IANAPrivateRanges

Expected behavior

Provide an error or waning

Environment summary

Additional context

jashwanth commented 1 year ago

Hi Team, Can you verify the above CLI bug and provide ETA on the fix as needed?

yonzhan commented 1 year ago

@necusjz for awareness

necusjz commented 1 year ago

@jashwanth As bandwidth limited, we'll fix it in Jan 2023.