resource "azurerm_virtual_machine" "azurerm_virtual_machine" {
location = "${var.location}"
resource_group_name = "${var.resource_group_name}"
name = "${var.hostname}"
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 ?