Skip to content

Instantly share code, notes, and snippets.

@Tapanila
Last active July 11, 2019 19:15

Revisions

  1. Tapanila revised this gist Jul 11, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion IPArray.json
    Original file line number Diff line number Diff line change
    @@ -29,7 +29,7 @@
    "value": "[variables('outputArray').items]",
    "type": "array"
    },
    "ipCount: {
    "ipCount": {
    "value": "[length(variables('outputArray'))]",
    "type": "int"
    }
  2. Tapanila revised this gist Jul 11, 2019. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions IPArray.json
    Original file line number Diff line number Diff line change
    @@ -28,6 +28,10 @@
    "ipRangeDefinitions": {
    "value": "[variables('outputArray').items]",
    "type": "array"
    },
    "ipCount: {
    "value": "[length(variables('outputArray'))]",
    "type": "int"
    }
    }
    }
  3. Tapanila created this gist Jul 10, 2019.
    33 changes: 33 additions & 0 deletions IPArray.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,33 @@
    {
    "$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"
    }
    }
    }