Skip to content

private DNS link VNET creation with DNS and VNET not in the same resource group #23351

@ahmedkhamessi

Description

@ahmedkhamessi

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az network private-dns link vnet create

Errors:

(BadRequest) Virtual network resource not found for '/subscriptions/******-****-***/resourceGroups/rg-name/providers/Microsoft.Network/virtualNetworks/VNET-Hub
'
Code: BadRequest
Message: Virtual network resource not found for '/subscriptions/******-****-***/resourceGroups/rg-name/providers/Microsoft.Network/virtualNetworks/VNET-Hub
'

**FYI**
The VNET exists and in the command line the VNET ID is being passed instead of the name

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • az network vnet create -g $RG1 -n $HubVnet --address-prefix $HubAddressSpace \ --subnet-name $HubSubnet --subnet-prefix $HubSubnetPrefix
  • az network private-dns zone create -g $RG2 -n $DNSZoneName
  • HubVnetId=$(az network vnet show \ --resource-group $RG1 \ --name $HubVnet \ --query id --out tsv)
  • az network private-dns link vnet create --name {} --registration-enabled {} --resource-group {} --virtual-network $HubVnetId --zone-name {} --debug

Expected Behavior

Create the private dns link.

Environment Summary

Windows-10-10.0.22000-SP0
Python 3.8.9
Installer: 

azure-cli 2.32.0 *

Extensions:
aks-preview 0.5.70
azure-firewall 0.14.1
ip-group 0.1.2

Dependencies:
msal 1.16.0
azure-mgmt-resource 20.0.0

Additional Context

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botNetworkaz network vnet/lb/nic/dns/etc...Network - DNSaz network dnsService AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions