Propagate gateway routes in bicep

MrFlinstone 441 Reputation points

I have got a peered vnet, peering the hub with the spoke. The hub has a VPN gateway attached to it. What I have found is that I cannot RDP onto a VM peered spoke network unless the propagate gateway routes is set to yes on the route attached to the subnet. This is despite the route having no defined route in place.

Unfortunately I cannot find where to script this within bicep.

In this case, I have tested with disableBGPProp set to true and false and despite this, it is still set to no.

param rtName string
param disableBGPProp bool = true
param routes array = []  //empty

name: rtName  
location: resourceGroup().location  
properties: {    
	disableBgpRoutePropagation: disableBGPProp    
	routes: routes  
tags: tags
output id string =
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
1,670 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ChaitanyaNaykodi-MSFT 15,961 Reputation points Microsoft Employee


    Thank you for reaching out.

    I followed the example here and was able to set the property Propagate gateway routes to yes.

    From the snippet above not sure about where you have defined the routetable resource.

    resource routetable 'Microsoft.Network/routeTables@2021-02-01'

    Can you follow the example above and see if that resolves the issue?

    if not, can you add the whole bicep script? for additional troubleshooting. Thank you!

    0 comments No comments