Attaching an array of data disks to a VM #6756
-
Hi, I create a bunch of data disks using an array of sizes given as parameter, along with the VM name:
As output, I get an array of disk IDs. But I could get any other parameters from the disk resource. However how can I attach these disks to the VM that is created in another module, using the output of this module? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Do you really need to create the disks ahead of time, then use the attach option? This is not common. Most often the vm or Vmss allows you to create the disks directly as part on the VM definition. Docs here: |
Beta Was this translation helpful? Give feedback.
Do you really need to create the disks ahead of time, then use the attach option?
This is not common.
Most often the vm or Vmss allows you to create the disks directly as part on the VM definition.
Docs here:
https://docs.microsoft.com/en-us/azure/templates/microsoft.compute/virtualmachines?tabs=bicep#datadisk