Azure VM OS disk not updated with storage_os_disk-->disk_size_gb.

519 views
Skip to first unread message

Dhinesh Kumar T

unread,
Apr 8, 2019, 1:13:25 AM4/8/19
to Terraform
Hi ,

Azure either with open storage_image_reference or custom storage_image_reference, the VM OS disk not updated with storage_os_disk-->disk_size_gb.
resource "azurerm_virtual_machine" "azurerm_virtual_machine" {
  location            = "${var.location}"
  resource_group_name = "${var.resource_group_name}"
  name                = "${var.hostname}"
  network_interface_ids = ["${azurerm_network_interface.main.id}"]

  vm_size = "Standard_DS4_v2"
  delete_os_disk_on_termination = true

  storage_image_reference {
    publisher = "OpenLogic"
    offer     = "CentOS"
    sku       = "7.5"
    version   = "latest"
  }
  
  //  storage_image_reference {
  //  }
  
  storage_os_disk {
    name              = "${var.hostname}-os-disk"
    create_option     = "FromImage"
    caching           = "ReadWrite"
    managed_disk_type = "Standard_LRS"
    os_type = "Linux"
    disk_size_gb = "120"
  }
  os_profile {
    computer_name  = "${var.hostname}"
    admin_username = "${var.admin_username}"
  }
  
  os_profile_linux_config {
    disable_password_authentication = true
    ssh_keys {
      path = "/home/${var.admin_username}/.ssh/authorized_keys"
      key_data = "${file(var.admin_user_pub_key)}"
    }
  }
}

Expectation the provisioned VM's shall have 120GB OS disk, whereas the OS disk size remains 30GB. Can someone help me what i am missing and how to fix this ?

Thanks, 
Dhinesh 

Lowe Schmidt

unread,
Apr 8, 2019, 5:07:59 AM4/8/19
to terrafo...@googlegroups.com
What is the output of you terraform apply ?
--
Lowe Schmidt | +46 723 867 157


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/99735afd-653c-42cf-8d58-717a1713ba2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dhinesh Kumar

unread,
Apr 8, 2019, 11:22:42 AM4/8/19
to terrafo...@googlegroups.com
Terraform apply is successful, actual node os disk Size is 30GB when login to the provisioned VM.

Thanks, Dhinesh 


For more options, visit https://groups.google.com/d/optout.
--
Sent from Gmail Mobile

Dhinesh Kumar T

unread,
Apr 24, 2019, 1:26:46 AM4/24/19
to Terraform

Can someone help me on what i am missing and how to fix this ?
Reply all
Reply to author
Forward
0 new messages