I was able to make a working single ARM template with rules engine and frontdoor.
Place the rule engine resource first with no dependsOn setting, then add the frontdoor resource with the dependsOn setting having the rules engine resource ID.
With some testing, it looks like the rules engine resource did not depend on front door to be created.
Here's an example of the snippet of the ARM template of the 2 resources:
{
"type": "Microsoft.Network/frontdoors/rulesengines",
"apiVersion": "2021-06-01",
"name": "[concat(parameters('frontDoorName'), '/ruleEngineName')]",
"properties": {
"resourceState": "Enabled",
"rules": [
{
"name": "ruleName",
"priority": 0,
"action": {...},
"matchConditions": [...],
"matchProcessingBehavior": "Continue"
}
]
}
},
{
"type": "Microsoft.Network/frontdoors",
"apiVersion": "2021-06-01",
"name": "[parameters('frontDoorName')]",
"location": "Global",
"dependsOn": [
"[resourceId('Microsoft.Network/frontdoors/rulesengines', parameters('frontDoorName'), 'ruleEngineName')]"
],
"properties": {
"routingRules": [
{
"id": "[concat(resourceId('Microsoft.Network/frontdoors', parameters('frontDoorName')), '/RoutingRules/routeRuleName')]",
"name": "routeRuleName",
"properties": {
"routeConfiguration": {
...
},
"rulesEngine": {
"id": "[resourceId('Microsoft.Network/frontdoors/rulesengines', parameters('frontDoorName'), 'ruleEngineName')]"
},
"resourceState": "Enabled",
"frontendEndpoints": [
...
],
"acceptedProtocols": [
...
],
"patternsToMatch": [
...
],
"enabledState": "Enabled"
}
}
],
"resourceState": "Enabled",
"loadBalancingSettings": [...],
"backendPools": [...],
"frontendEndpoints": [...],
"backendPoolsSettings": {...},
"enabledState": "Enabled",
"friendlyName": "[parameters('frontDoorName')]"
}
}