# Can terraform increase size of data disk in azure without taking the server offline

**URL:** <https://discuss.hashicorp.com/t/can-terraform-increase-size-of-data-disk-in-azure-without-taking-the-server-offline/64568>\
**Category:** Azure\
**Created:** [April 4, 2024, 3:00pm UTC](https://discuss.hashicorp.com/t/can-terraform-increase-size-of-data-disk-in-azure-without-taking-the-server-offline/64568 "2024-04-04T15:00:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexgoldberg1961](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/alexgoldberg1961/32/6997_2.png) [@alexgoldberg1961](https://discuss.hashicorp.com/u/alexgoldberg1961)\
**Post date:** [April 4, 2024, 3:00pm UTC](https://discuss.hashicorp.com/t/can-terraform-increase-size-of-data-disk-in-azure-without-taking-the-server-offline/64568/1 "2024-04-04T15:00:52Z")

</div>

It is possible to increase the size of a data disk while it is attached to a sunning server in Azure without stopping and deallocating the virtual machine using Azure Portal. However, when I try to do the same using terraform, the server is stopped and deallocated, disk size changed and the server starts back up.

Can this resize be done without taking the server offline.

This question is about data disks, not OS disk.

---

<div class="post-metadata">

**Author:** ![Contra](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/contra/32/1871_2.png) [@Contra](https://discuss.hashicorp.com/u/Contra)\
**Post date:** [April 20, 2024, 4:34pm UTC](https://discuss.hashicorp.com/t/can-terraform-increase-size-of-data-disk-in-azure-without-taking-the-server-offline/64568/2 "2024-04-20T16:34:18Z")

</div>

Have you seen the note on the documentation that this is supported for certain VM types?

[azurerm\_managed\_disk | Resources | hashicorp/azurerm | Terraform | Terraform Registry](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/managed_disk)
