Azure / bicep-registry-modules

Bicep registry modules
MIT License
472 stars 327 forks source link

[AVM Module Issue]: avm/ptn/lz/sub-vending: Re-running fails trying to add another VNet peering #3386

Open cspring86 opened 1 hour ago

cspring86 commented 1 hour ago

Check for previous/existing GitHub issues

Issue Type?

Bug

Module Name

avm/ptn/lz/sub-vending

(Optional) Module Version

0.1.5

Description

Following on from #3330

I updated to 0.1.5 and re-ran the pipeline.

The good news is that the subnet deletion problem looks to be fixed, thanks!

The bad news is that there's another issue.

It's trying to add another vnet peering even though one already exists because I'm running against an existing subscription.

Error:

{
  "code": "AnotherPeeringAlreadyReferencesRemoteVnet",
  "message": "Peering /subscriptions/***/resourceGroups/rg-alz-connectivity/providers/Microsoft.Network/virtualNetworks/alz-hub-eastus2/virtualNetworkPeerings/alz-hub-eastus2-alz-spoke-t2awudh7kzl5o-eastus2 already references remote virtual network Id: /subscriptions/xxx/resourceGroups/rg-alz-landingzones-online/providers/Microsoft.Network/virtualNetworks/alz-spoke-t2awudh7kzl5o-eastus2\r\nAddressSpace: \r\nResourceGuid: xxx\r\nProvisioningState: Succeeded\r\nCreatedTime: 0001-01-01T00:00:00.0000000\r\nLastModifiedTime: 0001-01-01T00:00:00.0000000\r\nPrefix, Subnet.Name\r\nNone\r\nSubnet details:\r\nIsSubnetIdAllocatedInNrp: False\r\nPrefix, Ipconfig.IsReferenceStub, Ipconfig.PrivateIPAddress, Ipconfig.Id\r\nNone\r\nCloudServices:\r\nGreKey: 0\r\nGreKeyAllocationId: 00000000-0000-0000-0000-000000000000\r\nGreKeyAllocationServiceUri: \r\nFailedGreKeyAllocationServiceUris:\r\nIDnsAclZoneId: \r\nRegionId: 0\r\nVnetFlowLogConfiguration: null\r\nExtendedLocation: . Cannot add another peering /subscriptions/***/resourceGroups/rg-alz-connectivity/providers/Microsoft.Network/virtualNetworks/alz-hub-eastus2/virtualNetworkPeerings/peer-alz-hub-eastus2-alz-spoke-t2awudh7kzl5o-eastus2 referencing the same remote virtual network.",
  "details": [],
}

Let me know if you need any more details.

(Optional) Correlation Id

No response

microsoft-github-policy-service[bot] commented 1 hour ago

[!IMPORTANT] The "Needs: Triage :mag:" label must be removed once the triage process is complete!

[!TIP] For additional guidance on how to triage this issue/PR, see the BRM Issue Triage documentation.

avm-team-linter[bot] commented 1 hour ago

@cspring86, thanks for submitting this issue for the avm/ptn/lz/sub-vending module!

[!IMPORTANT] A member of the @Azure/avm-ptn-lz-subvending-module-owners-bicep or @Azure/avm-ptn-lz-subvending-module-contributors-bicep team will review it soon!