Skip to content

az network firewall create accepts duplicate firewall name #24892

@Gizachew-Eshetie

Description

@Gizachew-Eshetie

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions