From 4b73f344b6e3294416e0779c543dee79623a4773 Mon Sep 17 00:00:00 2001 From: zjhe Date: Tue, 15 Nov 2022 21:53:40 +0800 Subject: [PATCH] rebase to latest master --- main.tf | 2 ++ variables.tf | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/main.tf b/main.tf index 33d3ffc5..b93eadad 100644 --- a/main.tf +++ b/main.tf @@ -62,6 +62,7 @@ resource "azurerm_virtual_machine" "vm_linux" { storage_os_disk { create_option = "FromImage" + disk_size_gb = var.storage_os_disk_size_gb name = "osdisk-${var.vm_hostname}-${count.index}" caching = "ReadWrite" managed_disk_type = var.storage_account_type @@ -176,6 +177,7 @@ resource "azurerm_virtual_machine" "vm_windows" { storage_os_disk { create_option = "FromImage" + disk_size_gb = var.storage_os_disk_size_gb name = "${var.vm_hostname}-osdisk-${count.index}" caching = "ReadWrite" managed_disk_type = var.storage_account_type diff --git a/variables.tf b/variables.tf index bbbd527c..898e6e7a 100644 --- a/variables.tf +++ b/variables.tf @@ -173,6 +173,12 @@ variable "source_address_prefixes" { default = ["0.0.0.0/0"] } +variable "storage_os_disk_size_gb" { + description = "(Optional) Specifies the size of the data disk in gigabytes." + type = number + default = null +} + variable "ssh_key" { description = "Path to the public key to be used for ssh access to the VM. Only used with non-Windows vms and can be left as-is even if using Windows vms. If specifying a path to a certification on a Windows machine to provision a linux vm use the / in the path versus backslash.e.g. c : /home/id_rsa.pub." type = string