Skip to content

Removing virtual networks from Private DNS zone does not work #7959

Description

@muwaqar

Describe the bug
In order to unlink/remove a virtual network from Private DNS zone, we pass "resolution-vnets" parameter as "" (empty string), but that does not seem to remove virtual network from the zone.

To Reproduce
(Create zone) az network dns zone create -n test-muwaqar.com -g hsbc --zone-type Private
(Create vnet) az network vnet create -n hsbc-res-vnet -g hsbc --address-prefixes 10.0.0.0/8 -l westus
(Link vnet to zone) az network dns zone update -n test-muwaqar.com -g hsbc --resolution-vnets "/subscriptions/9e900494-c413-45af-bd52-0afe6ac97b06/resourceGroups/hsbc/providers/Microsoft.Network/virtualNetworks/hsbc-res-vnet"
(Unlink vnet to zone) az network dns zone update -n test-muwaqar.com -g hsbc --resolution-vnets ""

Expected behavior
The last command mentioned above should remove vnet from resolutionVirtualNetworks of zone. But it does not.

Environment summary
cmd.exe, Windows
azure-cli (2.0.50)
network (2.2.8)

Additional context
Workaround is to use --remove:
az network dns zone update -n test-muwaqar.com -g hsbc --zone-type Private --remove resolutionVirtualNetworks

Metadata

Metadata

Assignees

Labels

bugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions