Skip to content

Updating data disk size #8512

Discussion options

You must be logged in to vote

It turns out I've answered my own question.

When creating a VM, what I would consider the "default" way to created data disks is part of the vm like:

resource linuxVM 'Microsoft.Compute/virtualMachines@2022-03-01' = {
  name: 'myvm'
  properties: {
    storageProfile: {
      dataDisks: [
        {
          name: 'datadisk0'
          createOption: 'Empty'
          diskSizeGB: managed_data_disk_size
          lun: 11
          managedDisk: {
            storageAccountType: managed_data_disk_type
          }
        }
      ]
    }
  }
}]

When doing this and changing the disk size it fails to update.

However, if you create the disk and then attach it to the vm, then the update will succe…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by brwilkinson
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants