Skip to content

Commit ddb9b1e

Browse files
committed
Azure Template | Correcting networkInterfaces resource dependencies to fix InvalidResourceReference error
1 parent c05053e commit ddb9b1e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

azure/templates/marketplace-management/mainTemplate.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,8 @@
813813
"apiVersion": "2020-06-01",
814814
"dependsOn": [
815815
"[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]",
816-
"[variables('publicIPAddressId')]"
816+
"[variables('publicIPAddressId')]",
817+
"[coalesce(resourceId('Microsoft.Network/networkSecurityGroups', parameters('NewNsgName')), variables('publicIPAddressId'))]"
817818
],
818819
"location": "[variables('location')]",
819820
"name": "[variables('nic1Name')]",

azure/templates/marketplace-mds/mainTemplate.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,8 @@
793793
"apiVersion": "2020-06-01",
794794
"dependsOn": [
795795
"[coalesce(resourceId('Microsoft.Resources/deployments', 'networkNewSetup'), resourceId('Microsoft.Resources/deployments', 'networkExistingSetup'))]",
796-
"[variables('publicIPAddressId')]"
796+
"[variables('publicIPAddressId')]",
797+
"[coalesce(resourceId('Microsoft.Network/networkSecurityGroups', parameters('NewNsgName')), variables('publicIPAddressId'))]"
797798
],
798799
"location": "[variables('location')]",
799800
"name": "[variables('nic1Name')]",

0 commit comments

Comments
 (0)