title: Looping over multiple parameters in Azure Pipeline task
body: <p>I am trying to create an Azure Pipeline. But I am having a problem looping an Azure task in it. I have explained below through a simplified example the problem I am facing.</p>
  <p>I hope to create multiple Azure web apps through this pipeline. Each webapp has a command passed to it using <code>--startup-file</code> and this command includes an argument. The number of apps to create and the argument to pass to each one, is provided as a runtime parameter when triggering the pipeline<br />
  E.g.
  If NUMBER=3 and ARGUMENTS=24,56,123<br />
  then each Azure web app <code>--name</code> and <code>--startup-file</code> should be as follows</p>
  <pre><code>--name myapp-1 --startup-file 'java -jar my.jar --arg 24   
  --name myapp-2 --startup-file 'java -jar my.jar --arg 56   
  --name myapp-3 --startup-file 'java -jar my.jar --arg 123   
  </code></pre>
  <p>The pipeline prompts the user for the number of web apps to create and a comma separated string of arguments to pass to them. An Azure pipeline step defined in  <code>main.yaml</code> passes these two parameters to a template (<code>createapps.yaml</code>). Then based on this template the defined number of apps must be created.</p>
  <p>main.yaml is as follows</p>
  <pre><code>parameters:
  - name: NUMBER
    type: number
  - name: ARGUMENTS
    type: string
  
  steps:
  - template: createapps.yaml
    parameters:
      NUMBER: ${{ parameters.NUMBER }}
      ARGUMENTS: ${{ parameters.ARGUMENTS }}
  </code></pre>
  <p>createapps.yaml is as follows</p>
  <pre><code>parameters:
  - name: NUMBER
    type: number
  - name: ARGUMENTS
    type: string
  
  steps:
  - task: AzureCLI@2
    displayName: Create Apps
      az webapp create \
        --name myapp-&lt;Number&gt; \
        --plan myplan \
        --resource-group myrg \
        --deployment-container-image-name myimage:latest \
        --startup-file 'java -jar my.jar --arg &lt;Argument&gt;'
  </code></pre>
  <p>How can I loop the task in <code>createapps.yaml</code> and assign &lt;Number&gt; and &lt;Argument&gt; in the Azure CLI command by iterating <code>NUMBER</code> and <code>ARGUMENTS</code>?</p>