diff --git a/Modules/NetworkSecurityGroups/deploy.json b/Modules/NetworkSecurityGroups/deploy.json index 5ecf3cf..f1b526c 100644 --- a/Modules/NetworkSecurityGroups/deploy.json +++ b/Modules/NetworkSecurityGroups/deploy.json @@ -64,6 +64,7 @@ "priority": "[int(parameters('networkSecurityGroupSecurityRules')[copyIndex('securityRules')].properties.priority)]", "protocol": "[parameters('networkSecurityGroupSecurityRules')[copyIndex('securityRules')].properties.protocol]", "sourceAddressPrefix": "[if(equals(parameters('networkSecurityGroupSecurityRules')[copyIndex('securityRules')].properties.sourceAddressPrefix, ''), json('null'), parameters('networkSecurityGroupSecurityRules')[copyIndex('securityRules')].properties.sourceAddressPrefix)]", + "sourceAddressPrefixes": "[if(equals(length(parameters('networkSecurityGroupSecurityRules')[copyIndex('securityRules')].properties.sourceAddressPrefixes), 0), json('null'), parameters('networkSecurityGroupSecurityRules')[copyIndex('securityRules')].properties.sourceAddressPrefixes)]", "sourceApplicationSecurityGroups": "[if(equals(length(parameters('networkSecurityGroupSecurityRules')[copyIndex('securityRules')].properties.sourceApplicationSecurityGroups), 0), json('null'), concat(variables('emptyArray'), array(json(concat('{\"id\": \"', resourceId('Microsoft.Network/applicationSecurityGroups', parameters('networkSecurityGroupSecurityRules')[copyIndex('securityRules')].properties.sourceApplicationSecurityGroups[0].name), '\"', ',', '\"location\": \"', resourceGroup().location, '\"}')))))]", "sourcePortRanges": "[if(equals(length(parameters('networkSecurityGroupSecurityRules')[copyIndex('securityRules')].properties.sourcePortRanges), 0), json('null'), parameters('networkSecurityGroupSecurityRules')[copyIndex('securityRules')].properties.sourcePortRanges)]", "sourcePortRange": "[parameters('networkSecurityGroupSecurityRules')[copyIndex('securityRules')].properties.sourcePortRange]" @@ -129,4 +130,4 @@ } } } -} \ No newline at end of file +}