private DNS link VNET creation with DNS and VNET not in the same resource group
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### **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
Contributor guide
Assessment
This issue has not been assessed yet.