Propagate gateway routes in bicep

MrFlinstone 541 Reputation points
2023-09-14T22:09:06.4966667+00:00

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 = routetable.id
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.
2,404 questions
{count} vote

1 answer

Sort by: Most helpful
  1. ChaitanyaNaykodi-MSFT 25,841 Reputation points Microsoft Employee
    2023-09-15T02:14:19.9233333+00:00

    @MrFlinstone

    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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.