From ddb9b1e4e05630b91dd80e4a90dfb0620d66112b Mon Sep 17 00:00:00 2001 From: natanelm Date: Tue, 10 Dec 2024 16:53:16 +0000 Subject: [PATCH] Azure Template | Correcting networkInterfaces resource dependencies to fix InvalidResourceReference error --- azure/templates/marketplace-management/mainTemplate.json | 3 ++- azure/templates/marketplace-mds/mainTemplate.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/azure/templates/marketplace-management/mainTemplate.json b/azure/templates/marketplace-management/mainTemplate.json index 7c7d26cd..bddd034b 100644 --- a/azure/templates/marketplace-management/mainTemplate.json +++ b/azure/templates/marketplace-management/mainTemplate.json @@ -813,7 +813,8 @@ "apiVersion": "2020-06-01", "dependsOn": [ "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", - "[variables('publicIPAddressId')]" + "[variables('publicIPAddressId')]", + "[coalesce(resourceId('Microsoft.Network/networkSecurityGroups', parameters('NewNsgName')), variables('publicIPAddressId'))]" ], "location": "[variables('location')]", "name": "[variables('nic1Name')]", diff --git a/azure/templates/marketplace-mds/mainTemplate.json b/azure/templates/marketplace-mds/mainTemplate.json index 7c1dca78..7f3e328b 100644 --- a/azure/templates/marketplace-mds/mainTemplate.json +++ b/azure/templates/marketplace-mds/mainTemplate.json @@ -793,7 +793,8 @@ "apiVersion": "2020-06-01", "dependsOn": [ "[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]", - "[variables('publicIPAddressId')]" + "[variables('publicIPAddressId')]", + "[coalesce(resourceId('Microsoft.Network/networkSecurityGroups', parameters('NewNsgName')), variables('publicIPAddressId'))]" ], "location": "[variables('location')]", "name": "[variables('nic1Name')]",