Azure Peering by CLI between VNETs in 2 different subscription
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
Hello, I am using the CLI script to setup peering between VNETs in 2 different subscription and getting the error.
this is my CLI:
az network vnet peering create \
--name VNET-01__to__VNET-02 \
--resource-group RG-01 \
--vnet-name VNET-01 \
--remote-vnet /subscriptions/subscription-2/resourceGroups/RG-02/providers/Microsoft.Network/virtualNetworks/VNET-02 \
--allow-gateway-transit \
--allow-vnet-access \
--use-remote-gateways
#
#
az network vnet peering create \
--name VNET-02__to__VNET-01 \
--resource-group RG-02 \
--vnet-name VNET-02 \
--remote-vnet /subscriptions/subscription-01/resourceGroups/RG-01/providers/Microsoft.Network/virtualNetworks/VNET-01 \
--allow-gateway-transit \
--allow-vnet-access
I need to run it from devops release pipelines, but getting the error: RG-02 not found
if I run it form portal shell - it is reversed: RG-01 not found
what do I need to do in order to fix it ?
Contributor guide
Assessment
This issue has not been assessed yet.