title: Azure Arm template copy function for VM and Datadisks
body: <p>I am using copy to create multiple VM's and want to have multiple datadisks for each vm.
  I know i can do it this way:</p>
  <pre><code>              {
                &quot;name&quot;: &quot;[concat('dataDisk-',parameters('vm-name'),'-0',copyIndex(1))]&quot;,
                &quot;diskSizeGB&quot;: &quot;[parameters('dataDisksize')]&quot;,
                &quot;lun&quot;: 0,
                &quot;createOption&quot;: &quot;Empty&quot;
                },
                {
                &quot;name&quot;: &quot;[concat('dataDisk1-',parameters('vm-name'),'-0',copyIndex(1))]&quot;,
                &quot;diskSizeGB&quot;: &quot;[parameters('dataDisksize')]&quot;,
                &quot;lun&quot;: 1,
                &quot;createOption&quot;: &quot;Empty&quot;
                }
  </code></pre>
  <p>Now I have to create 20 disks with the same name and this doesn't seem to be good workaround. Getting issue with disk name while using copy. For my case i can use the same disksize for all 20 disks</p>