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.
- 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
Assessment
This issue has not been assessed yet.