Azure / terraform-azurerm-vnetpeering

Module to create and manage virtual network peering which allows resources to access other resources in the linked virtual network.
MIT License
9 stars 32 forks source link

ResourceGroupNotFound when attempting cross subscription peering #4

Open sammc3 opened 4 years ago

sammc3 commented 4 years ago

When allow_cross_subscription_peering = true, I get the error below when the module attempts to create the peering in the second Azure subscription.

Error: network.VirtualNetworkPeeringsClient#CreateOrUpdate: Failure sending request: StatusCode=404 -- Original Error: Code="ResourceGroupNotFound" Message="Resource group 'xxx-xxx-xxxx-rg' could not be found."

on .terraform/modules/vnetpeering/main.tf line 50, in resource "azurerm_virtual_network_peering" "vnet_peer_2": 50: resource "azurerm_virtual_network_peering" "vnet_peer_2" {

bmyassine2020 commented 4 years ago

You must add attribut provider = "azurerm.subx" on each resource "azurerm_virtual_network_peering" "vnet_peer_x"

bastianjoe64 commented 3 years ago

still the same issue is persisting for me