diff --git a/policyDefinitions/Network/address-space-must-be-pre-allocated-for-region/azurepolicy.json b/policyDefinitions/Network/address-space-must-be-pre-allocated-for-region/azurepolicy.json index ebe931bc..1cfaf7ed 100644 --- a/policyDefinitions/Network/address-space-must-be-pre-allocated-for-region/azurepolicy.json +++ b/policyDefinitions/Network/address-space-must-be-pre-allocated-for-region/azurepolicy.json @@ -83,7 +83,7 @@ "where": { "allOf": [ { - "value": "[string( split( string( field('Microsoft.Network/virtualNetworks/virtualNetworkPeerings[*].remoteVirtualNetwork.id') ), '/' )[2]) ]", + "value": "[ split( string( field('Microsoft.Network/virtualNetworks/virtualNetworkPeerings[*].remoteVirtualNetwork.id') ), '/' )[2] ]", "in": "[parameters('hubSubscriptions')]" } ] diff --git a/policyDefinitions/Network/address-space-must-be-pre-allocated-for-region/azurepolicy.parameters.json b/policyDefinitions/Network/address-space-must-be-pre-allocated-for-region/azurepolicy.parameters.json index 9cb524f8..0e151b6a 100644 --- a/policyDefinitions/Network/address-space-must-be-pre-allocated-for-region/azurepolicy.parameters.json +++ b/policyDefinitions/Network/address-space-must-be-pre-allocated-for-region/azurepolicy.parameters.json @@ -23,7 +23,8 @@ "metadata": { "displayName": "(Optional) Hub Subscription IDs", "description": "An array of subscriptionIDs to which VNETs are peered; will cause the policy to only evaluate VNETs associated directly with your hubs." - } + }, + "defaultValue": [] }, "effect": { "type": "String", diff --git a/policyDefinitions/Network/address-space-must-be-pre-allocated-for-region/azurepolicy.rules.json b/policyDefinitions/Network/address-space-must-be-pre-allocated-for-region/azurepolicy.rules.json index ac63749c..69d668a1 100644 --- a/policyDefinitions/Network/address-space-must-be-pre-allocated-for-region/azurepolicy.rules.json +++ b/policyDefinitions/Network/address-space-must-be-pre-allocated-for-region/azurepolicy.rules.json @@ -29,7 +29,7 @@ "where": { "allOf": [ { - "value": "[split(field('Microsoft.Network/virtualNetworks/virtualNetworkPeerings[*].remoteVirtualNetwork.id'), '/')[2]]", + "value": "[ split( string( field('Microsoft.Network/virtualNetworks/virtualNetworkPeerings[*].remoteVirtualNetwork.id') ), '/' )[2] ]", "in": "[parameters('hubSubscriptions')]" } ]