Azure / Azure/bicep-registry-modules

[AVM Module Issue]: Cannot create networks without peering to the vWAN hub in subscription vending when the network is defined under additional networks.

Open
#6,893 5 comments 0 reactions 2 assignees Claimed by @jtracey93 View on GitHub
Class: Pattern Module :package: Needs: Immediate Attention :bangbang: Needs: Triage :mag: Status: Response Overdue :triangular_flag_on_post: Type: AVM :a: :v: :m: Type: Bug :bug:
Dominant language
Bicep
Stars
736
Forks
564
Avg merge
3d 15h
Merged PRs (30d)
30

Description

### Check for previous/existing GitHub issues

- [x] I have checked for previous/existing GitHub issues

### Issue Type?

Bug

### Module Name

avm/ptn/lz/sub-vending

### (Optional) Module Version

_No response_

### Description

Cannot create networks without peering to the vWAN hub in subscription vending when the network is defined under additional networks.

There is a parameter to control peering (peerToHubNetwork) in additional networks, but the network is always peered regardless of its value. It does not matter whether an alternate hub exists or if it should peer to the main hub.

The peering is triggered here and does not respect the peerToHubNetwork parameter:

module createAdditionalLzVirtualWanConnection 'hubVirtualNetworkConnections.bicep' = [
for (vnet, i) in additionalVirtualNetworks: if (virtualNetworkEnabled && !empty(additionalVirtualNetworks) && (!empty(vnet.?alternativeVwanHubResourceId ?? '') || !empty(virtualHubResourceIdChecked))) {
dependsOn: [
createResourceGroupForAdditionalLzNetworking
createAdditionalVnets
]

### (Optional) Correlation Id

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.