Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy Front Door with Rules Engine within single ARM template

I want to deploy an Azure Front Door with custom RuleEngine associated to one of the RoutingRules.

The whole problem is that RulesEngine has to be associated with RoutingRule, RoutingRule can be created only when creating Front Door, but RulesEngine also needs Front Door in order to be created.

https://learn.microsoft.com/en-us/azure/templates/microsoft.network/2020-05-01/frontdoors

I've tried to create a standalone resource of type Microsoft.Network/frontDoors/routingRules afterwards but I've got an error that resource type is invalid.

Am I missing something or this is impossible to achieve in single ARM deployment?

like image 887
kamilz Avatar asked Nov 06 '22 05:11

kamilz


1 Answers

Another solution would be to run imperative script after deployment to associate routingRule with RulesEngine.

As of today it would be:

az extension add -n front-door

az network front-door routing-rule update --front-door-name <fd-name> --name <routing-rule-nam> -g <resource-group-name> --rules-engine <rules-engine-name>

like image 150
Marek Grabarz Avatar answered Dec 02 '22 16:12

Marek Grabarz