diff --git a/201-front-door-premium-app-service-private-link/azuredeploy.json b/201-front-door-premium-app-service-private-link/azuredeploy.json index 5e6f49f450dd..bc0cb471824b 100644 --- a/201-front-door-premium-app-service-private-link/azuredeploy.json +++ b/201-front-door-premium-app-service-private-link/azuredeploy.json @@ -388,6 +388,7 @@ }, "dependsOn": [ "[resourceId('Microsoft.Cdn/profiles/afdEndpoints', split(format('{0}/{1}', variables('profileName'), parameters('endpointName')), '/')[0], split(format('{0}/{1}', variables('profileName'), parameters('endpointName')), '/')[1])]", + "[resourceId('Microsoft.Cdn/profiles/originGroups/origins', split(format('{0}/{1}', format('{0}/{1}', variables('profileName'), variables('originGroupName')), variables('originName')), '/')[0], split(format('{0}/{1}', format('{0}/{1}', variables('profileName'), variables('originGroupName')), variables('originName')), '/')[1], split(format('{0}/{1}', format('{0}/{1}', variables('profileName'), variables('originGroupName')), variables('originName')), '/')[2])]", "[resourceId('Microsoft.Cdn/profiles/originGroups', split(format('{0}/{1}', variables('profileName'), variables('originGroupName')), '/')[0], split(format('{0}/{1}', variables('profileName'), variables('originGroupName')), '/')[1])]" ] } @@ -422,8 +423,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.2.481.31468", - "templateHash": "9336460033928454750" + "version": "0.3.1.62928", + "templateHash": "9811260099064148025" } } } \ No newline at end of file diff --git a/201-front-door-premium-app-service-private-link/metadata.json b/201-front-door-premium-app-service-private-link/metadata.json index 8cd3fb2c4fed..9dff07a595aa 100644 --- a/201-front-door-premium-app-service-private-link/metadata.json +++ b/201-front-door-premium-app-service-private-link/metadata.json @@ -6,7 +6,7 @@ "summary": "This template creates a Front Door Premium (Preview) and an App Service, and uses a private endpoint for Front Door to send traffic to the application.", "githubUsername": "johndowns", "docOwner": "johndowns", - "dateUpdated": "2021-02-24", + "dateUpdated": "2021-03-10", "environments": [ "AzureCloud" ] diff --git a/201-front-door-premium-app-service-private-link/modules/front-door.bicep b/201-front-door-premium-app-service-private-link/modules/front-door.bicep index a8519c204fa9..87fc950a9517 100644 --- a/201-front-door-premium-app-service-private-link/modules/front-door.bicep +++ b/201-front-door-premium-app-service-private-link/modules/front-door.bicep @@ -95,6 +95,9 @@ resource origin 'Microsoft.Cdn/profiles/originGroups/origins@2020-09-01' = { resource route 'Microsoft.Cdn/profiles/afdEndpoints/routes@2020-09-01' = { name: '${endpoint.name}/${routeName}' + dependsOn: [ + origin // This explicit dependency is required to ensure that the origin group is not empty when the route is created. + ] properties: { originGroup: { id: originGroup.id