Azure / Azure/bicep-registry-modules

[AVM Module Issue]: lz/sub-vending ability to specify `alternativeVwanAssociatedRouteTableResourceId`, `alternativeVwanPropagatedRouteTablesResourceIds` on `additionalVirtualNetworks`

Open
#6,085 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: Feature Request :heavy_plus_sign:
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?

Feature Request

### Module Name

avm/ptn/lz/sub-vending

### (Optional) Module Version

0.4.0

### Description

Unable to have two virtual networks with different hubs and different route tables. There is no way to override the vwan association and propagation to the additional networks.

```bicep
hubNetworkResourceId: '/subscriptions/subId/resourceGroups/rg-wan/providers/Microsoft.Network/virtualHubs/vhub-southcentralus'
virtualNetworkVwanAssociatedRouteTableResourceId: '/subscriptions/subId/resourceGroups/rg-wan/providers/Microsoft.Network/virtualHubs/vhub-southcentralus/hubRouteTables/defaultRouteTable'
virtualNetworkVwanPropagatedRouteTablesResourceIds: [
'/subscriptions/subId/resourceGroups/rg-wan/providers/Microsoft.Network/virtualHubs/vhub-southcentralus/hubRouteTables/defaultRouteTable'
]
```

I would expect the default to use the additional vnet alternativeVwanHubResourceId for the route tables. The following error produces:

```json
{
"code": "VirtualWanConnectionAssociatedToNonLocalHubRT",
"message": "This connection /subscriptions/subId/resourceGroups/rg-wan/providers/Microsoft.Network/virtualHubs/vhub-northcentralus/hubVirtualNetworkConnections/vhc-spoke-network-northcentralus-42ad6 is associating to /subscriptions/sub/resourceGroups/rg-wan/providers/Microsoft.Network/virtualHubs/vhub-southcentralus/hubRouteTables/defaultRouteTable which is not a hubRouteTable of the local hub /subscriptions/subId/resourceGroups/rg-wan/providers/Microsoft.Network/virtualHubs/vhub-northcentralus."
}

```

### (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.