I have 3 VMs - eusvmdev01-3
Each VM has 6 attached data disks
The code below creates 6 disks for the first VM.
Is there an easier way to create the rest with a loop?
param location string
resource sharedDisk 'Microsoft.Compute/disks@2024-03-02' = [
for i in range(1, 6): {
location: location
name: 'eusvmdev01-data${i}'
properties: {
creationData: {
createOption: 'Empty'
}
diskSizeGB: 127
osType: 'Linux'
}
sku: {
name: 'Standard_LRS'
}
}
]