Hi,
To resize managed data disk without deallocating you would use the same technique as deallocating, except you don't deallocate the VM first. Please reference the article you linked to for limitations.
Below is sample Python code (modified from article) to resize data disk:
managed_disk = compute_client.disks.get('myResourceGroup', 'myDataDisk')
managed_disk.disk_size_gb = 256
async_update = self.compute_client.disks.begin_create_or_update(
'myResourceGroup',
'myDataDisk',
managed_disk
)
async_update.wait()
Below is sample CLI code (from article) to resize data disk:
az disk update --resource-group myResourceGroup --name myDataDisk --size-gb 256
Please click Accept Answer and upvote if the above was helpful.
Thanks.
-TP