Skip to content

Instantly share code, notes, and snippets.

@Tapanila
Last active July 11, 2019 19:15
Show Gist options
  • Save Tapanila/c5bb377f23e47299b2c7cc1d38e71a96 to your computer and use it in GitHub Desktop.
Save Tapanila/c5bb377f23e47299b2c7cc1d38e71a96 to your computer and use it in GitHub Desktop.
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"inputArray": {
"type": "array",
"metadata": {
"description": "string array of ip addresses"
}
}
},
"variables": {
"outputArray": {
"copy": [
{
"name": "items",
"count": "[length(parameters('inputArray'))]",
"input": {
"startIpAddress": "[parameters('inputArray')[copyIndex('items')]]",
"endIpAddress": "[parameters('inputArray')[copyIndex('items')]]",
}
}
]
}
},
"resources": [],
"outputs": {
"ipRangeDefinitions": {
"value": "[variables('outputArray').items]",
"type": "array"
},
"ipCount": {
"value": "[length(variables('outputArray'))]",
"type": "int"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment