Choose the best Terraform patch (A/B/C/D) that implements the requested Azure Compute change safely. Only respond with a single uppercase letter.

Task Description:
## Describe your changes

## Issue number

#000

## Checklist before requesting a review
- [ ] The pr title can be used to describe what this pr did in `CHANGELOG.md` file
- [ ] I have executed pre-commit on my machine
- [ ] I have passed pr-check on my machine

Thanks for your cooperation!

---

Choice A:
main.tf
@@ -4,10 +4,12 @@ module "os" {
 }

 data "azurerm_resource_group" "vm" {
-  name = var.resource_group_name
+  count = var.location == null ? 1 : 0
+  name  = var.resource_group_name
 }

 locals {
+  location = var.location == null ? data.azurerm_resource_group.vm[0].location : var.location
   ssh_keys = compact(concat([var.ssh_key], var.extra_ssh_keys))
 }

@@ -22,8 +24,8 @@ resource "random_id" "vm-sa" {
 resource "azurerm_storage_account" "vm-sa" {
   count                    = var.boot_diagnostics ? 1 : 0
   name                     = "bootdiag${lower(random_id.vm-sa.hex)}"
-  resource_group_name      = data.azurerm_resource_group.vm.name
-  location                 = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name      = var.resource_group_name
+  location                 = local.location
   account_tier             = element(split("_", var.boot_diagnostics_sa_type), 0)
   account_replication_type = element(split("_", var.boot_diagnostics_sa_type), 1)
   tags                     = var.tags
@@ -32,8 +34,8 @@ resource "azurerm_storage_account" "vm-sa" {
 resource "azurerm_virtual_machine" "vm-linux" {
   count                            = !contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && !var.is_windows_image ? var.nb_instances : 0
   name                             = "${var.vm_hostname}-vmLinux-${count.index}"
-  resource_group_name              = data.azurerm_resource_group.vm.name
-  location                         = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name              = var.resource_group_name
+  location                         = local.location
   availability_set_id              = azurerm_availability_set.vm.id
   vm_size                          = var.vm_size
   network_interface_ids            = [element(azurerm_network_interface.vm.*.id, count.index)]
@@ -143,8 +145,8 @@ resource "azurerm_virtual_machine" "vm-linux" {
 resource "azurerm_virtual_machine" "vm-windows" {
   count
          = (var.is_windows_image || contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer")) ? var.nb_instances : 0
   name                          = "${var.vm_hostname}-vmWindows-${count.index}"
-  resource_group_name           = data.azurerm_resource_group.vm.name
-  location                      = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name           = var.resource_group_name
+  location                      = local.location
   availability_set_id           = azurerm_availability_set.vm.id
   vm_size                       = var.vm_size
   network_interface_ids         = [element(azurerm_network_interface.vm.*.id, count.index)]
@@ -236,8 +238,8 @@ resource "azurerm_virtual_machine" "vm-windows" {

 resource "azurerm_availability_set" "vm" {
   name                         = "${var.vm_hostname}-avset"
-  resource_group_name          = data.azurerm_resource_group.vm.name
-  location                     = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name          = var.resource_group_name
+  location                     = local.location
   platform_fault_domain_count  = 2
   platform_update_domain_count = 2
   managed                      = true
@@ -247,8 +249,8 @@ resource "azurerm_availability_set" "vm" {
 resource "azurerm_public_ip" "vm" {
   count               = var.nb_public_ip
   name                = "${var.vm_hostname}-pip-${count.index}"
-  resource_group_name = data.azurerm_resource_group.vm.name
-  location            = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name = var.resource_group_name
+  location            = local.location
   allocation_method   = var.allocation_method
   sku                 = var.public_ip_sku
   domain_name_label   = element(var.public_ip_dns, count.index)
@@ -259,22 +261,22 @@ resource "azurerm_public_ip" "vm" {
 data "azurerm_public_ip" "vm" {
   count               = var.nb_public_ip
   name                = azurerm_public_ip.vm[count.index].name
-  resource_group_name = data.azurerm_resource_group.vm.name
+  resource_group_name = var.resource_group_name
   depends_on          = [azurerm_virtual_machine.vm-linux, azurerm_virtual_machine.vm-windows]
 }

 resource "azurerm_network_security_group" "vm" {
   name                = "${var.vm_hostname}-nsg"
-  resource_group_name = data.azurerm_resource_group.vm.name
-  location            = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name = var.resource_group_name
+  location            = local.location

   tags = var.tags
 }

 resource "azurerm_network_security_rule" "vm" {
   count                       = var.remote_port != "" ? 1 : 0
   name                        = "allow_remote_${coalesce(var.remote_port, module.os.calculated_remote_port)}_in_all"
-  resource_group_name         = data.azurerm_resource_group.vm.name
+  resource_group_name         = var.resource_group_name
   description                 = "Allow remote protocol in from all locations"
   priority                    = 101
   direction                   = "Inbound"
@@ -290,8 +292,8 @@ resource "azurerm_network_security_rule" "vm" {
 resource "azurerm_network_interface" "vm" {
   count                         = var.nb_instances
   name                          = "${var.vm_hostname}-nic-${count.index}"
-  resource_group_name           = data.azurerm_resource_group.vm.name
-  location                      = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name           = var.resource_group_name
+  location                      = local.location
   enable_accelerated_networking = var.enable_accelerated_networking

   ip_configuration {
---

---

Choice B:
main.tf
@@ -4,10 +4,12 @@ module "os" {
 }

 data "azurerm_resource_group" "vm" {
-  name = var.resource_group_name
+  count = var.location == null ? 1 : 0
+  name  = var.resource_group_name
 }

 locals {
+  location = var.location == null ? data.azurerm_resource_group.vm[0].location : var.location
   ssh_keys = compact(concat([var.ssh_key], var.extra_ssh_keys))
 }

@@ -22,8 +24,8 @@ resource "random_id" "vm-sa" {
 resource "azurerm_storage_account" "vm-sa" {
   count                    = var.boot_diagnostics ? 1 : 0
   name                     = "bootdiag${lower(random_id.vm-sa.hex)}"
-  resource_group_name      = data.azurerm_resource_group.vm.name
-  location                 = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name      = var.resource_group_name
+  location                 = local.location
   account_tier             = element(split("_", var.boot_diagnostics_sa_type), 0)
   account_replication_type = element(split("_", var.boot_diagnostics_sa_type), 1)
   tags                     = var.tags
@@ -32,8 +34,8 @@ resource "azurerm_storage_account" "vm-sa" {
 resource "azurerm_virtual_machine" "vm-linux" {
   count                            = !contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && !var.is_windows_image ? var.nb_instances : 0
   name                             = "${var.vm_hostname}-vmLinux-${count.index}"
-  resource_group_name              = data.azurerm_resource_group.vm.name
-  location                         = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name              = var.resource_group_name
+  location                         = local.location
   availability_set_id              = azurerm_availability_set.vm.id
   vm_size                          = var.vm_size
   network_interface_ids            = [element(azurerm_network_interface.vm.*.id, count.index)]
@@ -143,8 +145,8 @@ resource "azurerm_virtual_machine" "vm-linux" {
 resource "azurerm_virtual_machine" "vm-windows" {
   count                         = (var.is_windows_image || contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer")) ? var.nb_instances : 0
   name                          = "${var.vm_hostname}-vmWindows-${count.index}"
-  resource_group_name           = data.azurerm_resource_group.vm.name
-  location                      = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name           = var.resource_group_name
+  location                      = local.location
   availability_set_id           = azurerm_availability_set.vm.id
   vm_size                       = var.vm_size
   network_interface_ids         = [element(azurerm_network_interface.vm.*.id, count.index)]
@@ -236,8 +238,8 @@ resource "azurerm_virtual_machine" "vm-windows" {

 resource "azurerm_availability_set" "vm" {
   name                         = "${var.vm_hostname}-avset"
-  resource_group_name          = data.azurerm_resource_group.vm.name
-  location                     = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name          = var.resource_group_name
+  location                     = local.location
   platform_fault_domain_count  = 2
   platform_update_domain_count = 2
   managed                      = true
@@ -247,8 +249,8 @@ resource "azurerm_availability_set" "vm" {
 resource "azurerm_public_ip" "vm" {
   count               = var.nb_public_ip
   name                = "${var.vm_hostname}-pip-${count.index}"
-  resource_group_name = data.azurerm_resource_group.vm.name
-  location            = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name = var.resource_group_name
+  location            = local.location
   allocation_method   = var.allocation_method
   sku                 = var.public_ip_sku
   domain_name_label   = element(var.public_ip_dns, count.index)
@@ -259,22 +261,22 @@ resource "azurerm_public_ip" "vm" {
 data "azurerm_public_ip" "vm" {
   count               = var.nb_public_ip
   name                = azurerm_public_ip.vm[count.index].name
-  resource_group_name = data.azurerm_resource_group.vm.name
+ coalesce(var.location, resource_group_name = var.resource_group_name
   depends_on          = [azurerm_virtual_machine.vm-linux, azurerm_virtual_machine.vm-windows]
 }

 resource "azurerm_network_security_group" "vm" {
   name                = "${var.vm_hostname}-nsg"
-  resource_group_name = data.azurerm_resource_group.vm.name
-  location            = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name = var.resource_group_name
+  location            = local.location

   tags = var.tags
 }

 resource "azurerm_network_security_rule" "vm" {
   count                       = var.remote_port != "" ? 1 : 0
   name                        = "allow_remote_${coalesce(var.remote_port, module.os.calculated_remote_port)}_in_all"
-  resource_group_name         = data.azurerm_resource_group.vm.name
+  resource_group_name         = var.resource_group_name
   description                 = "Allow remote protocol in from all locations"
   priority                    = 101
   direction                   = "Inbound"
@@ -290,8 +292,8 @@ resource "azurerm_network_security_rule" "vm" {
 resource "azurerm_network_interface" "vm" {
   count                         = var.nb_instances
   name                          = "${var.vm_hostname}-nic-${count.index}"
-  resource_group_name           = data.azurerm_resource_group.vm.name
-  location                      = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name           = var.resource_group_name
+  location                      = local.location
   enable_accelerated_networking = var.enable_accelerated_networking

   ip_configuration {
---

---

Choice C:
main.tf
@@ -4,10 +4,12 @@ module "os" {
 }

 data "azurerm_resource_group" "vm" {
-  name = var.resource_group_name
+  count = var.location == null ? 1 : 0
+  name  = var.resource_group_name
 }

 locals {
+  location = var.location == null ? data.azurerm_resource_group.vm[0].location : var.location
   ssh_keys = compact(concat([var.ssh_key], var.extra_ssh_keys))
 }

@@ -22,8 +24,8 @@ resource "random_id" "vm-sa" {
 resource "azurerm_storage_account" "vm-sa" {
   count                    = var.boot_diagnostics ? 1 : 0
   name                     = "bootdiag${lower(random_id.vm-sa.hex)}"
-  resource_group_name      = data.azurerm_resource_group.vm.name
-  location                 = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name      = var.resource_group_name
+  location                 = local.location
   account_tier             = element(split("_", var.boot_diagnostics_sa_type), 0)
   account_replication_type = element(split("_", var.boot_diagnostics_sa_type), 1)
   tags                     = var.tags
@@ -32,8 +34,8 @@ resource "azurerm_storage_account" "vm-sa" {
 resource "azurerm_virtual_machine" "vm-linux" {
   count                            = !contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && !var.is_windows_image ? var.nb_instances : 0
   name                             = "${var.vm_hostname}-vmLinux-${count.index}"
-  resource_group_name              = data.azurerm_resource_group.vm.name
-  location                         = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name              = var.resource_group_name
+  location                         = local.location
   availability_set_id              = azurerm_availability_set.vm.id
   vm_size                          = var.vm_size
   network_interface_ids            = [element(azurerm_network_interface.vm.*.id, count.index)]
@@ -143,8 +145,8 @@ resource "azurerm_virtual_machine" "vm-linux" {
 resource "azurerm_virtual_machine" "vm-windows" {
   count                         = (var.is_windows_image || contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer")) ? var.nb_instances : 0
   name                          = "${var.vm_hostname}-vmWindows-${count.index}"
-  resource_group_name           = data.azurerm_resource_group.vm.name
-  location                      = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name           = var.resource_group_name
+  location                      = local.location
   availability_set_id           = azurerm_availability_set.vm.id
   vm_size                       = var.vm_size
   network_interface_ids         = [element(azurerm_network_interface.vm.*.id, count.index)]
@@ -236,8 +238,8 @@ resource "azurerm_virtual_machine" "vm-windows" {

 resource "azurerm_availability_set" "vm" {
   name                         = "${var.vm_hostname}-avset"
-  resource_group_name          = data.azurerm_resource_group.vm.name
-  location                     = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name          = var.resource_group_name
+  location                     = local.location
   platform_fault_domain_count  = 2
   platform_update_domain_count = 2
   managed                      = true
@@ -247,8 +249,8 @@ resource "azurerm_availability_set" "vm" {
 resource "azurerm_public_ip" "vm" {
   count               = var.nb_public_ip
   name                = "${var.vm_hostname}-pip-${count.index}"
-  resource_group_name = data.azurerm_resource_group.vm.name
-  location            = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name = var.resource_group_name
+  location            = local.location
   allocation_method   = var.allocation_method
   sku                 = var.public_ip_sku
   domain_name_label   = element(var.public_ip_dns, count.index)
@@ -259,22 +261,22 @@ resource "azurerm_public_ip" "vm" {
 data "azurerm_public_ip" "vm" {
   count               = var.nb_public_ip
   name                = azurerm_public_ip.vm[count.index].name
-  resource_group_name = data.azurerm_resource_group.vm.name
+  resource_group_name = var.resource_group_name
   depends_on          = [azurerm_virtual_machine.vm-linux, azurerm_virtual_machine.vm-windows]
 }

 resource "azurerm_network_security_group" "vm" {
   name                = "${var.vm_hostname}-nsg"
-  resource_group_name = data.azurerm_resource_group.vm.name
-  location            = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name = var.resource_group_name
+  location            = local.location

   tags = var.tags
 }

 resource "azurerm_network_security_rule" "vm" {
   count                       = var.remote_port != "" ? 1 : 0
   name                        = "allow_remote_${coalesce(var.remote_port, module.os.calculated_remote_port)}_in_all"
-  resource_group_name         = data.azurerm_resource_group.vm.name
+  resource_group_name         = var.resource_group_name
   description                 = "Allow remote protocol in from all locations"
   priority                    = 101
   direction                   = "Inbound"
@@ -290,8 +292,8 @@ resource "azurerm_network_security_rule" "vm" {
 resource "azurerm_network_interface" "vm" {
   count                         = var.nb_instances
   name                          = "${var.vm_hostname}-nic-${count.index}"
-  resource_group_name           = data.azurerm_resource_group.vm.name
-  location                      = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name           = var.resource_group_name
+  location                      = local.location
   enable_accelerated_networking = var.enable_accelerated_networking

   ip_configuration {
---

---

Choice D:
main.tf
@@ -4,10 +4,12 @@ module "os" {
 }

 data "azurerm_resource_group" "vm" {
-  name = var.resource_group_name
+  count = var.location == null ? 1 : 0
+  name  = var.resource_group_name
 }

 locals {
+  location = var.location == null ? data.azurerm_resource_group.vm[0].location : var.location
   ssh_keys = compact(concat([var.ssh_key], var.extra_ssh_keys))
 }

@@ -22,8 +24,8 @@ resource "random_id" "vm-sa" {
 resource "azurerm_storage_account" "vm-sa" {
   count                    = var.boot_diagnostics ? 1 : 0
   name                     = "bootdiag${lower(random_id.vm-sa.hex)}"
-  resource_group_name      = data.azurerm_resource_group.vm.name
-  location                 = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name      = var.resource_group_name
+  location                 = local.location
   account_tier             = element(split("_", var.boot_diagnostics_sa_type), 0)
   account_replication_type = element(split("_", var.boot_diagnostics_sa_type), 1)
   tags                     = var.tags
@@ -32,8 +34,8 @@ resource "azurerm_storage_account" "vm-sa" {
 resource "azurerm_virtual_machine" "vm-linux" {
   count                            = !contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && !var.is_windows_image ? var.nb_instances : 0
   name                             = "${var.vm_hostname}-vmLinux-${count.index}"
-  resource_group_name              = data.azurerm_resource_group.vm.name
-  location                         = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name              = var.resource_group_name
+  location                         = local.location
   availability_set_id              = azurerm_availability_set.vm.id
   vm_size                          = var.vm_size
   network_interface_ids            = [element(azurerm_network_interface.vm.*.id, count.index)]
@@ -143,8 +145,8 @@ resource "azurerm_virtual_machine" "vm-linux" {
 resource "azurerm_virtual_machine" "vm-windows" {
   count                         = (var.is_windows_image || contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer")) ? var.nb_instances : 0
   name                          = "${var.vm_hostname}-vmWindows-${count.index}"
-  resource_group_name           = data.azurerm_resource_group.vm.name
-  location                      = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name           = var.resource_group_name
+  location                      = local.location
   availability_set_id           = azurerm_availability_set.vm.id
   vm_size                       = var.vm_size
   network_interface_ids         = [element(azurerm_network_interface.vm.*.id, count.index)]
@@ -236,8 +238,8 @@ resource "azurerm_virtual_machine" "vm-windows" {

 resource "azurerm_availability_set" "vm" {
   name                         = "${var.vm_hostname}-avset"
-  resource_group_name          = data.azurerm_resource_group.vm.name
-  location                     = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name          = var.resource_group_name
+  location                     = local.location
   platform_fault_domain_count  = 2
   platform_update_domain_count = 2
   managed                      = true
@@ -247,8 +249,8 @@ resource "azurerm_availability_set" "vm" {
 resource "azurerm_public_ip" "vm" {
   count               = var.nb_public_ip
   name                = "${var.vm_hostname}-pip-${count.index}"
-  resource_group_name = data.azurerm_resource_group.vm.name
-  location            = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name = var.resource_group_name
+  location            = local.location
   allocation_method   = var.allocation_method
   sku                 = var.public_ip_sku
   domain_name_label   = element(var.public_ip_dns, count.index)
@@ -259,22 +261,22 @@ resource "azurerm_public_ip" "vm" {
 data "azurerm_public_ip" "vm" {
   count               = var.nb_public_ip
   name                = azurerm_public_ip.vm[count.index].name
-  resource_group_name = data.azurerm_resource_group.vm.name
+  resource_group_name = var.resource_group_name
   depends_on          = [azurerm_virtual_machine.vm-linux, azurerm_virtual_machine.vm-windows]
 }

 resource "azurerm_network_security_group" "vm" {
   name                = "${var.vm_hostname}-nsg"
-  resource_group_name = data.azurerm_resource_group.vm.name
-  location            = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name = var.resource_group_name
+  location            = local.location

   tags = var.tags
 }

 resource "azurerm_network_security_rule" "vm" {
   count                       = var.remote_port != "" ? 1 : 0
   name                        = "allow_remote_${coalesce(var.remote_port, module.os.calculated_remote_port)}_in_all"
-  resource_group_name         = data.azurerm_resource_group.vm.name
+  resource_group_name         = var.resource_group_name
   description                 = "Allow remote protocol in from all locations"
   priority                    = 101
   direction                   = "Inbound"
@@ -290,8 +292,8 @@ resource "azurerm_network_security_rule" "vm" {
 resource "azurerm_network_interface" "vm" {
   count                         = var.nb_instances
   name                          = "${var.vm_hostname}-nic-${count.index}"
-  resource_group_name           = data.azurerm_resource_group.vm.name
-  location                      = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  resource_group_name           = var.resource_group_name
+  location                      = local.location
   enable_accelerated_networking = var.enable_accelerated_networking

   ip_configuration {
---

---


Choose the best Terraform patch (A/B/C/D) that implements the requested Azure Compute change safely. Only respond with a single uppercase letter.

Task Description:
## Describe your changes

## Issue number

#000

## Checklist before requesting a review
- [ ] The pr title can be used to describe what this pr did in `CHANGELOG.md` file
- [ ] I have executed pre-commit on my machine
- [ ] I have passed pr-check on my machine

Thanks for your cooperation!

---

Choice A:
examples/complete/main.tf
@@ -81,8 +81,6 @@ module "ubuntuservers" {
       certificate_url = azurerm_key_vault_certificate.test.secret_id
     }
   ]
-
-  depends_on = [azurerm_resource_group.test]
 }

 module "debianservers" {
@@ -113,8 +111,6 @@ module "debianservers" {
       name = "extra2"
     }
   ]
-
-  depends_on = [azurerm_resource_group.test]
 }

 module "debianservers2" {
@@ -130,8 +126,6 @@ module "debianservers2" {
   delete_os_disk_on_termination    = true
   ssh_key                          = ""
   ssh_key_values                   = [file("${path.module}/monica_id_rsa.pub")]
-
-  depends_on = [azurerm_resource_group.test]
 }

 module "windowsservers" {
@@ -155,6 +149,4 @@ module "windowsservers" {
       certificate_store = "My"
     }
   ]
-
-  depends_on = [azurerm_resource_group.test]
 }
---

---

Choice B:
examples/complete/main.tf
@@ -81,8 +81,6 @@ module "ubuntuservers" {
       certificate_url = azurerm_key_vault_certificate.test.secret_id
     }
   ]
-
-  depends_on = [azurerm_resource_group.test]
 }

 module "debianservers" {
@@ -113,8 +111,6 @@ module "debianservers" {
       name = "extra2"
     }
   ]
-
-  depends_on = [azurerm_resource_group.test]
 }

 module "debianservers2" {
@@ -130,8 +126,6 @@ module "debianservers2" {
   delete_os_disk_on_termination    = true
   ssh_key                          = ""
   ssh_key_values                   = [file("${path.module}/monica_id_rsa.pub")]
-
-  depends_on = [azurerm_resource_group.test]
 }

 module "windowsservers" {
@@ -155,6 +149,4 @@ module "windowsservers" {
       certificate_store = "My"
     }
   ]
-
-  depends_on = [azurerm_resource_group.test]
 }
---

---

Choice C:
examples/complete/main.tf
@@ -81,8 +81,6 @@ module "ubuntuservers" {
       certificate_url = azurerm_key_vault_certificate.test.secret_id
     }
   ]
-
-  depends_on = [azurerm_resource_group.test]
 }

 module "debianservers" {
@@ -113,8 +111,6 @@ module "debianservers" {
       name = "extra2"
     }
   ]
-
-  depends_on = [azurerm_resource_group.test]
 }

 module "debianservers2" {
@@ -130,8 +126,6 @@ module "debianservers2" {
   delete_os_disk_on_termination    = true
   ssh_key                          = ""
   ssh_key_values                   = [file("${path.module}/monica_id_rsa.pub")]
-
-  depends_on = [azurerm_resource_group.test]
 }

 module "windowsservers" {
@@ -155,6 +149,4 @@ module "windowsservers" {
       certificate_store = "My"
     }
   ]
-
-  depends_on = [azurerm_resource_group.test]
 }
---

---

Choice D:
examples/complete/main.tf
@@ -81,8 +81,6 @@ module "ubuntuservers" {
       certificate_url = azurerm_key_vault_certificate.test.secret_id
     }
   ]
-
-  depends_on = [azurerm_resource_group.test]
 }

 module "debianservers" {
@@ -113,8 +111,6 @@ module "debianservers" {
       name = "extra2"
     }
   ]
-
-  depends_on = [azurerm_resource_group.test]
 }

 module "debianservers2" {
@@ -130,8 +126,6 @@ module "debianservers2" {
   delete_os_disk_on_termination    = true
   ssh_key                          = ""
   ssh_key_values                   = [file("${path.module}/monica_id_rsa.pub")]
-
-  depends_on = [azurerm_resource_group.test]
 }

 module "windowsservers" {
@@ -155,6 +149,4 @@ module "windowsservers" {
       certificate_store = "My"
     }
   ]
-
-  depends_on = [azurerm_resource_group.test]
 }
---

---


Choose the best Terraform patch (A/B/C/D) that implements the requested Azure Compute change safely. Only respond with a single uppercase letter.

Task Description:
## Describe your changes

This pull request added an override template file to example folder so the version upgrade test could work properly.

## Issue number

## Checklist before requesting a review
- [*] The pr title can be used to describe what this pr did in `CHANGELOG.md` file
- [*] I have executed pre-commit on my machine
- [*] I have passed pr-check on my machine

Thanks for your cooperation!

---

Choice A:
examples/complete/override.tf.tplt
@@ -0,0 +1,24 @@
+terraform {
+  required_providers {
+    azurerm = {
+      source  = "hashicorp/azurerm"
+      version = "{{ env "TERRAFORM_AZURERM_VERSION" | default ">= 3.11, < 4.0"}}"
+    }
+  }
+}
+
+module "ubuntuservers" {
+  source = "{{env "MODULE_SOURCE" |  default "../../"}}"
+}
+
+module "debianservers" {
+  source = "{{env "MODULE_SOURCE" |  default "../../"}}"
+}
+
+module "debianservers2" {
+  source = "{{env "MODULE_SOURCE" |  default "../../"}}"
+}
+
+module "windowsservers" {
+  source = "{{env "MODULE_SOURCE" |  default "../../"}}"
+}
\ No newline at end of file
---
test/e2e/terraform_compute_test.go
@@ -15,7 +15,7 @@ func TestExamplesComplete(t *testing.T) {
 	vars := make(map[string]interface{})
 	managedIdentityId := os.Getenv("MSI_ID")
 	if managedIdentityId != "" {
-		vars["managed_identity_principal_id"] = managedIdentityId
+		_ = os.Setenv("TF_VAR_managed_identity_principal_id", managedIdentityId)
 	}
 	test_helper.RunE2ETest(t, "../../", "examples/complete", terraform.Options{
 		Upgrade: true,
---
test/upgrade/upgrade_test.go
@@ -20,7 +20,7 @@ func TestExampleUpgrade_complete(t *testing.T) {
 	vars := make(map[string]interface{})
 	managedIdentityId := os.Getenv("MSI_ID")
 	if managedIdentityId != "" {
-		vars["managed_identity_principal_id"] = managedIdentityId
+		_ = os.Setenv("TF_VAR_managed_identity_principal_id", managedIdentityId)
 	}
 	test_helper.ModuleUpgradeTest(t, "Azure", "terraform-azurerm-compute", "examples/complete", currentRoot, terraform.Options{
 		Upgrade: true,
---

---

Choice B:
examples/complete/override.tf.tplt
@@ -0,0 +1,24 @@
+terraform {
+  required_providers {
+    azurerm = {
+      source  = "hashicorp/azurerm"
+      version = "{{ env "TERRAFORM_AZURERM_VERSION" | default ">= 3.11, < 4.0"}}"
+    }
+  }
+}
+
+module "ubuntuservers" {
+  source = "{{env "MODULE_SOURCE" |  default "../../"}}"
+}
+
+module "debianservers" {
+  source = "{{env "MODULE_SOURCE" |  default "../../"}}"
+}
+
+module "debianservers2" {
+  source = "{{env "MODULE_SOURCE" |  default "../../"}}"
+}
+
+module "windowsservers" {
+  source = "{{env "MODULE_SOURCE" |  default "../../"}}"
+}
\ No newline at end of file
---
test/e2e/terraform_compute_test.go
@@ -15,7 +15,7 @@ func TestExamplesComplete(t *testing.T) {
 	vars := make(map[string]interface{})
 	managedIdentityId := os.Getenv("MSI_ID")
 	if managedIdentityId != "" {
-		vars["managed_identity_principal_id"] = managedIdentityId
+		_ = os.Setenv("TF_VAR_managed_identity_principal_id", managedIdentityId)
 	}
 	test_helper.RunE2ETest(t, "../../", "examples/complete", terraform.Options{
 		Upgrade: true,
---
test/upgrade/upgrade_test.go
@@ -20,7 +20,7 @@ func TestExampleUpgrade_complete(t *testing.T) {
 	vars := make(map[string]interface{})
 	managedIdentityId := os.Getenv("MSI_ID")
 	if managedIdentityId "../../"}}"
+}
+
+module "" {
-		vars["managed_identity_principal_id"] = managedIdentityId
+		_ = os.Setenv("TF_VAR_managed_identity_principal_id", managedIdentityId)
 	}
 	test_helper.ModuleUpgradeTest(t, "Azure", "terraform-azurerm-compute", "examples/complete", currentRoot, terraform.Options{
 		Upgrade: true,
---

---

Choice C:
examples/complete/override.tf.tplt
@@ -0,0 +1,24 @@
+terraform {
+  required_providers {
+    azurerm = {
+      source  = "hashicorp/azurerm"
+      version = "{{ env "TERRAFORM_AZURERM_VERSION" | default ">= 3.11, < 4.0"}}"
+    }
+  }
+}
+
+module "ubuntuservers" {
+  source = "{{env "MODULE_SOURCE" |  default "../../"}}"
+}
+
+module "debianservers" {
+  source = "{{env "MODULE_SOURCE" |  default "../../"}}"
+}
+
+module "debianservers2" {
+  source = "{{env "MODULE_SOURCE" |  default "../../"}}"
+}
+
+module "windowsservers" {
+  source = "{{env "MODULE_SOURCE" |  default "../../"}}"
+}
\ No newline at end of file
---
test/e2e/terraform_compute_test.go
@@ -15,7 +15,7 @@ func TestExamplesComplete(t *testing.T) {
 	vars := make(map[string]interface{})
 	managedIdentityId := os.Getenv("MSI_ID")
 	if managedIdentityId != "" {
-		vars["managed_identity_principal_id"] = managedIdentityId
+		_ = os.Setenv("TF_VAR_managed_identity_principal_id",  	}
 	test_helper.RunE2ETest(t, "../../", "examples/complete", terraform.Options{
 		Upgrade: true,
---
test/upgrade/upgrade_test.go
@@ -20,7 +20,7 @@ func TestExampleUpgrade_complete(t *testing.T) {
 	vars := make(map[string]interface{})
 	managedIdentityId := os.Getenv("MSI_ID")
 	if managedIdentityId != "" {
-		vars["managed_identity_principal_id"] = managedIdentityId
+		_ = os.Setenv("TF_VAR_managed_identity_principal_id", managedIdentityId)
 	}
 	test_helper.ModuleUpgradeTest(t, "Azure", "terraform-azurerm-compute", "examples/complete", currentRoot, terraform.Options{
 		Upgrade: true,
---

---

Choice D:
examples/complete/override.tf.tplt
@@ -0,0 +1,24 @@
+terraform {
+  required_providers {
+    azurerm = azurerm      source  = "hashicorp/azurerm"
+      version = "{{ env "TERRAFORM_AZURERM_VERSION" | default ">= 3.11, < 4.0"}}"
+    }
+  }
+}
+
+module "ubuntuservers" {
+  source = "{{env "MODULE_SOURCE" |  default "../../"}}"
+}
+
+module "debianservers" {
+  source = "{{env "MODULE_SOURCE" |  default "../../"}}"
+}
+
+module "debianservers2" {
+  source = "{{env "MODULE_SOURCE" |  default "../../"}}"
+}
+
+module "windowsservers" {
+  source = "{{env "MODULE_SOURCE" |  default "../../"}}"
+}
\ No newline at end of file
---
test/e2e/terraform_compute_test.go
@@ -15,7 +15,7 @@ func TestExamplesComplete(t *testing.T) {
 	vars := make(map[string]interface{})
 	managedIdentityId := os.Getenv("MSI_ID")
 	if managedIdentityId != "" {
-		vars["managed_identity_principal_id"] = managedIdentityId
+		_ = os.Setenv("TF_VAR_managed_identity_principal_id", managedIdentityId)
 	}
 	test_helper.RunE2ETest(t, "../../", "examples/complete", terraform.Options{
 		Upgrade: true,
---
test/upgrade/upgrade_test.go
@@ -20,7 +20,7 @@ func TestExampleUpgrade_complete(t *testing.T) {
 	vars := make(map[string]interface{})
 	managedIdentityId := os.Getenv("MSI_ID")
 	if managedIdentityId != "" {
-		vars["managed_identity_principal_id"] = managedIdentityId
+		_ = os.Setenv("TF_VAR_managed_identity_principal_id", managedIdentityId)
 	}
 	test_helper.ModuleUpgradeTest(t, "Azure", "terraform-azurerm-compute", "examples/complete", currentRoot, terraform.Options{
 		Upgrade: true,
---

---


Choose the best Terraform patch (A/B/C/D) that implements the requested Azure Compute change safely. Only respond with a single uppercase letter.

Task Description:
Fixes #172

---

Choice A:
README.md
@@ -439,6 +439,7 @@ Originally created by [David Tesar](http://github.com/dtzar)
 |  [ssh\_key](#input\_ssh\_key)                                                                                | 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.                                                                                | `string`                                                                    | `"~/.ssh/id_rsa.pub"`                        |    no    |
 |  [ssh\_key\_values](#input\_ssh\_key\_values)                                                           | List of Public SSH Keys values to be used for ssh access to the VMs.                                                                                | `list(string)`                                                              | `[]`                                         |    no    |
 |  [storage\_account\_type](#input\_storage\_account\_type)                                         | Defines the type of storage account to be created. Valid options are Standard\_LRS, Standard\_ZRS, Standard\_GRS, Standard\_RAGRS, Premium\_LRS.                                                                                | `string`                                                                    | `"Premium_LRS"`                              |    no    |
+|  [storage\_os\_disk\_size\_gb](#input\_storage\_os\_disk\_size\_gb)                            | (Optional) Specifies the size of the data disk in gigabytes.                                                                                | `number`                                                                    | `null`                                       |    no    |
 |  [tags](#input\_tags)                                                                                | A map of the tags to use on the resources that are deployed with this module.                                                                                | `map(string)`                                                               |
{
  "source": "terraform"
}
 |    no    |
 |  [vm\_hostname](#input\_vm\_hostname)                                                                      | local name of the Virtual Machine.                                                                                | `string`                                                                    | `"myvm"`                                     |    no    |
 |  [vm\_os\_id](#input\_vm\_os\_id)                                                                             | The resource ID of the image that you want to deploy if you are using a custom image.Note, need to provide is\_windows\_image = true for windows custom images.                                                                                | `string`                                                                    | `""`                                         |    no    |
---
main.tf
@@ -68,6 +68,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
     create_option     = "FromImage"
     caching           = "ReadWrite"
     managed_disk_type = var.storage_account_type
+    disk_size_gb      = var.storage_os_disk_size_gb
   }

   dynamic "storage_data_disk" {
@@ -178,6 +179,7 @@ resource "azurerm_virtual_machine" "vm-windows" {
     create_option     = "FromImage"
     caching           = "ReadWrite"
     managed_disk_type = var.storage_account_type
+    disk_size_gb      = var.storage_os_disk_size_gb
   }

   dynamic "storage_data_disk" {
---
variables.tf
@@ -178,6 +178,12 @@ variable "data_disk_size_gb" {
   default     = 30
 }

+variable "storage_os_disk_size_gb" {
+  description = "(Optional) Specifies the size of the data disk in gigabytes."
+  type        = number
+  default     = null
+}
+
 variable "boot_diagnostics" {
   type        = bool
   description = "(Optional) Enable or Disable boot diagnostics."
---

---

Choice B:
README.md
@@ -439,6 +439,7 @@ Originally created by [David Tesar](http://github.com/dtzar)
 |  [ssh\_key](#input\_ssh\_key)                                                                                | 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.                                                                                | `string`                                                                    | `"~/.ssh/id_rsa.pub"`                        |    no    |
 |  [ssh\_key\_values](#input\_ssh\_key\_values)                                                           | List of Public SSH Keys values to be used for ssh access to the VMs.                                                                                | `list(string)`                                                              | `[]`                                         |    no    |
 |  [storage\_account\_type](#input\_storage\_account\_type)                                         | Defines the type of storage account to be created. Valid options are Standard\_LRS, Standard\_ZRS, Standard\_GRS, Standard\_RAGRS, Premium\_LRS.                                                                                | `string`                                                                    | `"Premium_LRS"`                              |    no    |
+|  [storage\_os\_disk\_size\_gb](#input\_storage\_os\_disk\_size\_gb)                            | (Optional) Specifies the size of the data disk in gigabytes.                                                                                | `number`                                                                    | `null`                                       |    no    |
 |  [tags](#input\_tags)                                                                                | A map of the tags to use on the resources that are deployed with this module.                                                                                | `map(string)`                                                               |
{
  "source": "terraform"
}
 |    no    |
 |  [vm\_hostname](#input\_vm\_hostname)                                                                      | local name of the Virtual Machine.                                                                                | `string`                                                                    | `"myvm"`                                     |    no    |
 |  [vm\_os\_id](#input\_vm\_os\_id)                                                                             | The resource ID of the image that you want to deploy if you are using a custom image.Note, need to provide is\_windows\_image = true for windows custom images.                                                                                | `string`                                                                    | `""`                                         |    no    |
---
main.tf
@@ -68,6 +68,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
     create_option     = "FromImage"
     caching           = "ReadWrite"
     managed_disk_type = var.storage_account_type
+    disk_size_gb      = var.storage_os_disk_size_gb
   }

   dynamic "storage_data_disk" {
@@ -178,6 +179,7 @@ resource "azurerm_virtual_machine" "vm-windows" {
     create_option     = "FromImage"
     caching           = "ReadWrite"
     managed_disk_type = var.storage_account_type
+    disk_size_gb      = var.storage_os_disk_size_gb
   }

   dynamic "storage_data_disk" {
---
variables.tf
@@ -178,6 +178,12 @@ variable "data_disk_size_gb" {
   default     = 30
 }

+variable "storage_os_disk_size_gb" {
+  description = "(Optional) Specifies the size of the data disk in gigabytes."
+  type        = number
+  default     = null
+}
+
 variable "boot_diagnostics" {
   type        = bool
   description = "(Optional) Enable or Disable boot diagnostics."
---

---

Choice C:
README.md
@@ -439,6 +439,7 @@ Originally created by [David Tesar](http://github.com/dtzar)
 |  [ssh\_key](#input\_ssh\_key)                                                                                | 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.                                                                                | `string`                                                                    | `"~/.ssh/id_rsa.pub"`                        |    no    |
 |  [ssh\_key\_values](#input\_ssh\_key\_values)                                                           | List of Public SSH Keys values to be used for ssh access to the VMs.                                                                                | `list(string)`                                                              | `[]`                                         |    no    |
 |  [storage\_account\_type](#input\_storage\_account\_type)                                         | Defines the type of storage account to be created. Valid options are Standard\_LRS, Standard\_ZRS, Standard\_GRS, Standard\_RAGRS, Premium\_LRS.                                                                                | `string`                                                                    | `"Premium_LRS"`                              |    no    |
+|  [storage\_os\_disk\_size\_gb](#input\_storage\_os\_disk\_size\_gb)                            | (Optional) Specifies the size of the data disk in gigabytes.                                                                                | `number`                                                                    | `null`                                       |    no    |
 |  [tags](#input\_tags)                                                                                | A map of the tags to use on the resources that are deployed with this module.                                                                                | `map(string)`                                                               |
{
  "source": "terraform"
}
 |    no    |
 |  [vm\_hostname](#input\_vm\_hostname)                                                                      | local name of the Virtual Machine.                                                                                | `string`                                                                    | `"myvm"`                                     |    no    |
 |  [vm\_os\_id](#input\_vm\_os\_id)                                                                             | The resource ID of the image that you want to deploy if you are using a custom image.Note, need to provide is\_windows\_image = true for windows custom images.                                                                                | `string`                                                                    | `""`                                         |    no    |
---
main.tf
@@ -68,6 +68,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
     create_option     = "FromImage"
     caching           = "ReadWrite"
     managed_disk_type = var.storage_account_type
+    disk_size_gb      = var.storage_os_disk_size_gb
   }

   dynamic "storage_data_disk" {
@@ -178,6 +179,7 @@ resource "azurerm_virtual_machine" "vm-windows" {
     create_option     = "FromImage"
                = "ReadWrite"
     managed_disk_type = var.storage_account_type
+    disk_size_gb      = var.storage_os_disk_size_gb
   }

   dynamic "storage_data_disk" {
---
variables.tf
@@ -178,6 +178,12 @@ variable "data_disk_size_gb" {
   default     = 30
 }

+variable "storage_os_disk_size_gb" {
+  description = "(Optional) Specifies the size of the data disk in gigabytes."
+  type        = number
+  default     = null
+}
+
 variable "boot_diagnostics" {
   type        = bool
   description = "(Optional) Enable or Disable boot diagnostics."
---

---

Choice D:
README.md
@@ -439,6 +439,7 @@ Originally created by [David Tesar](http://github.com/dtzar)
 |  [ssh\_key](#input\_ssh\_key)                                                                                | 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.                                                                                | `string`                                                                    | `"~/.ssh/id_rsa.pub"`                        |    no    |
 |  [ssh\_key\_values](#input\_ssh\_key\_values)                                                           | List of Public SSH Keys values to be used for ssh access to the VMs.                                                                                | `list(string)`                                                              | `[]`                                         |    no    |
 |  [storage\_account\_type](#input\_storage\_account\_type)                                         | Defines the type of storage account to be created. Valid options are Standard\_LRS, Standard\_ZRS, Standard\_GRS, Standard\_RAGRS, Premium\_LRS.                                                                                | `string`                                                                    | `"Premium_LRS"`                              |    no    |
+|  [storage\_os\_disk\_size\_gb](#input\_storage\_os\_disk\_size\_gb)                            | (Optional) Specifies the size of the data disk in gigabytes.                                                                                | `number`                                                                    | `null`                                       |    no    |
 |  [tags](#input\_tags)                                                                                | A map of the tags to use on the resources that are deployed with this module.                                                                                | `map(string)`                                                               |
{
  "source": "terraform"
}
 |    no    |
 |  [vm\_hostname](#input\_vm\_hostname)                                                                      | local name of the Virtual Machine.                                                                                Specifies                                                                                | `string`                                                                    | `"myvm"`                                     |    no    |
 |  [vm\_os\_id](#input\_vm\_os\_id)                                                                             | The resource ID of the image that you want to deploy if you are using a custom image.Note, need to provide is\_windows\_image = true for windows custom images.                                                                                | `string`                                                                    | `""`                                         |    no    |
---
main.tf
@@ -68,6 +68,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
     create_option     = "FromImage"
     caching           = "ReadWrite"
     managed_disk_type = var.storage_account_type
+    disk_size_gb      = var.storage_os_disk_size_gb
   }

   dynamic "storage_data_disk" {
@@ -178,6 +179,7 @@ resource "azurerm_virtual_machine" "vm-windows" {
     create_option     = "FromImage"
     caching           = "ReadWrite"
     managed_disk_type = var.storage_account_type
+    disk_size_gb      = var.storage_os_disk_size_gb
   }

   dynamic "storage_data_disk" {
---
variables.tf
@@ -178,6 +178,12 @@ variable "data_disk_size_gb" {
   default     = 30
 }

+variable "storage_os_disk_size_gb" {
+  description = "(Optional) Specifies the size of the data disk in gigabytes."
+  type        = number
+  default     = null
+}
+
 variable "boot_diagnostics" {
   type        = bool
   description = "(Optional) Enable or Disable boot diagnostics."
---

---


Choose the best Terraform patch (A/B/C/D) that implements the requested Azure Compute change safely. Only respond with a single uppercase letter.

Task Description:
Please accept this contribution adding the standard Microsoft SECURITY.MD :lock: file to help the community understand the security policy and how to safely report security issues. GitHub uses the presence of this file to light-up security reminders and a link to the file. This pull request commits the latest official SECURITY.MD file from https://github.com/microsoft/repo-templates/blob/main/shared/SECURITY.md.

Microsoft teams can [learn more about this effort and share feedback](https://docs.opensource.microsoft.com/releasing/maintain/templates/) within the open source guidance available internally.

---

Choice A:
SECURITY.md
@@ -0,0 +1,41 @@
+<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->
+
+## Security
+
+Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
+
+If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
+
+## Reporting Security Issues
+
+**Please do not report security vulnerabilities through public GitHub issues.**
+
+Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
+
+If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com).  If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
+
+You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
+
+Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
+
+  * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
+  * Full paths of source file(s) related to the manifestation of the issue
+  * The location of the affected source code (tag/branch/commit or direct URL)
+  * Any special configuration required to reproduce the issue
+  * Step-by-step instructions to reproduce the issue
+  * Proof-of-concept or exploit code (if possible)
+  * Impact of the issue, including how an attacker might exploit the issue
+
+This information will help us triage your report more quickly.
+
+If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
+
+## Preferred Languages
+
+We prefer all communications to be in English.
+
+## Policy
+
+Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
+
+<!-- END MICROSOFT SECURITY.MD BLOCK -->
---

---

Choice B:
SECURITY.md
@@ -0,0 +1,41 @@
+<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->
+
+## Security
+
+Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
+
+If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
+
+## Reporting Security Issues
+
+**Please do not report security vulnerabilities through public GitHub issues.**
+
+Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
+
+If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com).  If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
+
+You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information message be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
+
+Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
+
+  * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
+  * Full paths of source file(s) related to the manifestation of the issue
+  * The location of the affected source code (tag/branch/commit or direct URL)
+  * Any special configuration required to reproduce the issue
+  * Step-by-step instructions to reproduce the issue
+  * Proof-of-concept or exploit code (if possible)
+  * Impact of the issue, including how an attacker might exploit the issue
+
+This information will help us triage your report more quickly.
+
+If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
+
+## Preferred Languages
+
+We prefer all communications to be in English.
+
+## Policy
+
+Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
+
+<!-- END MICROSOFT SECURITY.MD BLOCK -->
---

---

Choice C:
SECURITY.md
@@ -0,0 +1,41 @@
+<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->
+
+## Security
+
+Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
+
+If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
+
+## Reporting Security Issues
+
+**Please do not report security vulnerabilities through public GitHub issues.**
+
+Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
+
+If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com).  If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
+
+You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional Key can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
+
+Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
+
+  * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
+  * Full paths of source file(s) related to the manifestation of the issue
+  * The location of the affected source code (tag/branch/commit or direct URL)
+  * Any special configuration required to reproduce the issue
+  * Step-by-step instructions to reproduce the issue
+  * Proof-of-concept or exploit code (if possible)
+  * Impact of the issue, including how an attacker might exploit the issue
+
+This information will help us triage your report more quickly.
+
+If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
+
+## Preferred Languages
+
+We prefer all communications to be in English.
+
+## Policy
+
+Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
+
+<!-- END MICROSOFT SECURITY.MD BLOCK -->
---

---

Choice D:
SECURITY.md
@@ -0,0 +1,41 @@
+<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->
+
+## Security
+
+Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
+
+If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
+
+## Reporting Security Issues
+
+**Please do not report security vulnerabilities through public GitHub issues.**
+
+Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
+
+If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com).  If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
+
+You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
+
+Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
+
+ our * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
+  * Full paths of source file(s) related to the manifestation of the issue
+  * The location of the affected source code (tag/branch/commit or direct URL)
+  * Any special configuration required to reproduce the issue
+  * Step-by-step instructions to reproduce the issue
+  * Proof-of-concept or exploit code (if possible)
+  * Impact of the issue, including how an attacker might exploit the issue
+
+This information will help us triage your report more quickly.
+
+If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
+
+## Preferred Languages
+
+We prefer all communications to be in English.
+
+## Policy
+
+Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
+
+<!-- END MICROSOFT SECURITY.MD BLOCK -->
---

---


Choose the best Terraform patch (A/B/C/D) that implements the requested Azure Compute change safely. Only respond with a single uppercase letter.

Task Description:
<!---
Please add this into the test of test/fixture, format the changes by "terraform fmt", and test it by run the following:
```sh
$ docker build --build-arg BUILD_ARM_SUBSCRIPTION_ID=$ARM_SUBSCRIPTION_ID --build-arg BUILD_ARM_CLIENT_ID=$ARM_CLIENT_ID --build-arg BUILD_ARM_CLIENT_SECRET=$ARM_CLIENT_SECRET --build-arg BUILD_ARM_TENANT_ID=$ARM_TENANT_ID -t azure-compute .
$ docker run --rm azure-compute /bin/bash -c "bundle install && rake full"
```

Please add this into the example usage of README.md and format the changes by "terrafmt fmt README.md". Please intall "terrafmt" by [install terrafmt](https://github.com/katbyte/terrafmt#install).
--->

Fixes #000

Changes proposed in the pull request:

Exchanged today with Alex from Azure support and we were unable to use marketplace image with this module, troubleshooting generated VM, what missed were the plan section of _azurerm_virtual_machine_

This PR allow users to use such type of images.

---

Choice A:
main.tf
@@ -30,6 +30,13 @@ resource "azurerm_storage_account" "vm-sa" {
 }

 resource "azurerm_virtual_machine" "vm-linux" {
+  lifecycle {
+    precondition {
+      condition     = !var.is_marketplace_image || (var.vm_os_offer != null && var.vm_os_publisher != null && var.vm_os_sku != null)
+      error_message = "`var.vm_os_offer`, `vm_os_publisher` and `var.vm_os_sku` are required when `var.is_marketplace_image` is `true`."
+    }
+  }
+
   count                            = !contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && !var.is_windows_image ? var.nb_instances : 0
   name                             = "${var.vm_hostname}-vmLinux-${count.index}"
   resource_group_name              = data.azurerm_resource_group.vm.name
@@ -63,6 +70,15 @@ resource "azurerm_virtual_machine" "vm-linux" {
     version   = var.vm_os_id == "" ? var.vm_os_version : ""
   }

+  dynamic "plan" {
+    for_each = var.is_marketplace_image ? [1] : []
+    content {
+      name      = var.vm_os_offer
+      publisher = var.vm_os_publisher
+      product   = var.vm_os_sku
+    }
+  }
+
   storage_os_disk {
     name              = "osdisk-${var.vm_hostname}-${count.index}"
     create_option     = "FromImage"
@@ -174,6 +190,15 @@ resource "azurerm_virtual_machine" "vm-windows" {
     version   = var.vm_os_id == "" ? var.vm_os_version : ""
   }

+  dynamic "plan" {
+    for_each = var.is_marketplace_image ? [1] : []
+    content {
+      name      = var.vm_os_offer
+      publisher = var.vm_os_publisher
+      product   = var.vm_os_sku
+    }
+  }
+
   storage_os_disk {
     name              = "${var.vm_hostname}-osdisk-${count.index}"
     create_option     = "FromImage"
---
variables.tf
@@ -103,6 +103,13 @@ variable "is_windows_image" {
   default     = false
 }

+variable "is_marketplace_image" {
+  description = "Boolean flag to notify when the image comes from the marketplace."
+  type        = bool
+  nullable    = false
+  default     = false
+}
+
 variable "vm_os_publisher" {
   description = "The name of the publisher of the image that you want to deploy. This is ignored when vm_os_id or vm_os_simple are provided."
   type        = string
---

---

Choice B:
main.tf
@@ -30,6 +30,13 @@ resource "azurerm_storage_account" "vm-sa" {
 }

 resource "azurerm_virtual_machine" "vm-linux" {
+  lifecycle {
+    precondition {
+      condition     = !var.is_marketplace_image || (var.vm_os_offer != null && var.vm_os_publisher != null && var.vm_os_sku != null)
+      error_message = "`var.vm_os_offer`, `vm_os_publisher` and `var.vm_os_sku` are required when `var.is_marketplace_image` is `true`."
+    }
+  }
+
   count                            = !contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && !var.is_windows_image ? var.nb_instances : 0
   name                             = "${var.vm_hostname}-vmLinux-${count.index}"
   resource_group_name              = data.azurerm_resource_group.vm.name
@@ -63,6 +70,15 @@ resource "azurerm_virtual_machine" "vm-linux" {
     version   = var.vm_os_id == "" ? var.vm_os_version : ""
   }

+  dynamic "plan" {
+    for_each = var.is_marketplace_image ? [1] : []
+    content {
+      name      = var.vm_os_offer
+      publisher = var.vm_os_publisher
+      product   = var.vm_os_sku
+    }
+  }
+
   storage_os_disk {
     name              = "osdisk-${var.vm_hostname}-${count.index}"
     create_option     = "FromImage"
@@ -174,6 +190,15 @@ resource "azurerm_virtual_machine" "vm-windows" {
     version   = var.vm_os_id == "" ? var.vm_os_version : ""
   }

+  dynamic "plan" {
+    for_each = var.is_marketplace_image ? [1] : []
+    content {
+      name      = var.vm_os_offer
+      publisher = var.vm_os_publisher
+      product   = var.vm_os_sku
+    }
+  }
+
   storage_os_disk {
     name              = "${var.vm_hostname}-osdisk-${count.index}"
     create_option     = "FromImage"
---
variables.tf
@@ -103,6 +103,13 @@ variable "is_windows_image" {
   default     = false
 }

+variable "is_marketplace_image" {
+  description = "Boolean flag to notify when the image comes from the marketplace."
+  type        = bool
+  nullable var.vm_os_sku
+   = false
+  default     = false
+}
+
 variable "vm_os_publisher" {
   description = "The name of the publisher of the image that you want to deploy. This is ignored when vm_os_id or vm_os_simple are provided."
   type        = string
---

---

Choice C:
main.tf
@@ -30,6 +30,13 @@ resource "azurerm_storage_account" "vm-sa" {
 }

 resource "azurerm_virtual_machine" "vm-linux" {
+  lifecycle {
+    precondition {
+      condition     = !var.is_marketplace_image || (var.vm_os_offer != null && var.vm_os_publisher != null && var.vm_os_sku != null)
+      error_message = "`var.vm_os_offer`, `vm_os_publisher` and `var.vm_os_sku` are required when `var.is_marketplace_image` is `true`."
+    }
+  }
+
   count                            = !contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && !var.is_windows_image ? var.nb_instances : 0
   name                             = "${var.vm_hostname}-vmLinux-${count.index}"
   resource_group_name              = data.azurerm_resource_group.vm.name
@@ -63,6 +70,15 @@ resource "azurerm_virtual_machine" "vm-linux" {
     version   = var.vm_os_id == "" ? var.vm_os_version : ""
   }

+  dynamic "plan" {
+    for_each = var.is_marketplace_image ? [1] : []
+    content {
+      name      = var.vm_os_offer
+      publisher = var.vm_os_publisher
+      product   = var.vm_os_sku
+    }
+  }
+
   storage_os_disk {
     name              = "osdisk-${var.vm_hostname}-${count.index}"
     create_option     = "FromImage"
@@ -174,6 +190,15 @@ resource "azurerm_virtual_machine" "vm-windows" {
     version   = var.vm_os_id == "" ? var.vm_os_version : ""
   }

+  dynamic "plan" {
+    for_each = var.is_marketplace_image ? [1] : []
+    content {
+      name      = var.vm_os_offer
+      publisher = var.vm_os_publisher
+      product   = var.vm_os_sku
+    }
+  }
+
   storage_os_disk {
     name              = "${var.vm_hostname}-osdisk-${count.index}"
     create_option     = "FromImage"
---
variables.tf
@@ -103,6 +103,13 @@ variable "is_windows_image" {
   default     = false
 }

+variable "is_marketplace_image" {
+  description = "Boolean flag to notify when the image comes from the marketplace."
+  type        = bool
+  nullable    = false
+  default     = false
+}
+
 variable "vm_os_publisher" {
   description = "The name of the publisher of the image that you want to deploy. This is ignored when vm_os_id or vm_os_simple are provided."
   type        = string
---

---

Choice D:
main.tf
@@ -30,6 +30,13 @@ resource "azurerm_storage_account" "vm-sa" {
 }

 resource "azurerm_virtual_machine" "vm-linux"   lifecycle {
+    precondition {
+      condition     = !var.is_marketplace_image || (var.vm_os_offer != null && var.vm_os_publisher != null && var.vm_os_sku != null)
+      error_message = "`var.vm_os_offer`, `vm_os_publisher` and `var.vm_os_sku` are required when `var.is_marketplace_image` is `true`."
+    }
+  }
+
   count                            = !contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && !var.is_windows_image ? var.nb_instances : 0
   name                             = "${var.vm_hostname}-vmLinux-${count.index}"
   resource_group_name              = data.azurerm_resource_group.vm.name
@@ -63,6 +70,15 @@ resource "azurerm_virtual_machine" "vm-linux" {
     version   = var.vm_os_id == "" ? var.vm_os_version : ""
   }

+  dynamic "plan" {
+    for_each = var.is_marketplace_image ? [1] : []
+    content {
+      name      = var.vm_os_offer
+      publisher = var.vm_os_publisher
+      product   = var.vm_os_sku
+    }
+  }
+
   storage_os_disk {
     name              = "osdisk-${var.vm_hostname}-${count.index}"
     create_option     = "FromImage"
@@ -174,6 +190,15 @@ resource "azurerm_virtual_machine" "vm-windows" {
     version   = var.vm_os_id == "" ? var.vm_os_version : ""
   }

+  dynamic "plan" {
+    for_each = var.is_marketplace_image ? [1] : []
+    content {
+      name      = var.vm_os_offer
+      publisher = var.vm_os_publisher
+      product   = var.vm_os_sku
+    }
+  }
+
   storage_os_disk {
     name              = "${var.vm_hostname}-osdisk-${count.index}"
     create_option     = "FromImage"
---
variables.tf
@@ -103,6 +103,13 @@ variable "is_windows_image" {
   default     = false
 }

+variable "is_marketplace_image" {
+  description = "Boolean flag to notify when the image comes from the marketplace."
+  type        = bool
+  nullable    = false
+  default     = false
+}
+
 variable "vm_os_publisher" {
   description = "The name of the publisher of the image that you want to deploy. This is ignored when vm_os_id or vm_os_simple are provided."
   type        = string
---

---


Choose the best Terraform patch (A/B/C/D) that implements the requested Azure Compute change safely. Only respond with a single uppercase letter.

Task Description:
<!---
Please add this into the test of test/fixture, format the changes by "terraform fmt", and test it by run the following:
```sh
$ docker build --build-arg BUILD_ARM_SUBSCRIPTION_ID=$ARM_SUBSCRIPTION_ID --build-arg BUILD_ARM_CLIENT_ID=$ARM_CLIENT_ID --build-arg BUILD_ARM_CLIENT_SECRET=$ARM_CLIENT_SECRET --build-arg BUILD_ARM_TENANT_ID=$ARM_TENANT_ID -t azure-compute .
$ docker run --rm azure-compute /bin/bash -c "bundle install && rake full"
```

Please add this into the example usage of README.md and format the changes by "terrafmt fmt README.md". Please intall "terrafmt" by [install terrafmt](https://github.com/katbyte/terrafmt#install).
--->

Fixes #172

Changes proposed in the pull request: make it possible to use larger OS disks (using datadisks is possible but honestly its a pain to get them up and running for quick turnaround)

---

Choice A:
main.tf
@@ -30,7 +30,7 @@ resource "azurerm_storage_account" "vm-sa" {
 }

 resource "azurerm_virtual_machine" "vm-linux" {
-  count                            = ! contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && ! var.is_windows_image ? var.nb_instances : 0
+  count                            = !contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && !var.is_windows_image ? var.nb_instances : 0
   name                             = "${var.vm_hostname}-vmLinux-${count.index}"
   resource_group_name              = data.azurerm_resource_group.vm.name
   location                         = coalesce(var.location, data.azurerm_resource_group.vm.location)
@@ -40,14 +40,14 @@ resource "azurerm_virtual_machine" "vm-linux" {
   delete_os_disk_on_termination    = var.delete_os_disk_on_termination
   delete_data_disks_on_termination = var.delete_data_disks_on_termination

-  dynamic identity {
+  dynamic "identity" {
     for_each = length(var.identity_ids) == 0 && var.identity_type == "SystemAssigned" ? [var.identity_type] : []
     content {
       type = var.identity_type
     }
   }

-  dynamic identity {
+  dynamic "identity" {
     for_each = length(var.identity_ids) > 0 || var.identity_type == "UserAssigned" ? [var.identity_type] : []
     content {
       type         = var.identity_type
@@ -68,9 +68,10 @@ resource "azurerm_virtual_machine" "vm-linux" {
     create_option     = "FromImage"
     caching           = "ReadWrite"
     managed_disk_type = var.storage_account_type
+    disk_size_gb      = var.os_disk_size_gb
   }

-  dynamic storage_data_disk {
+  dynamic "storage_data_disk" {
     for_each = range(var.nb_data_disk)
     content {
       name              = "${var.vm_hostname}-datadisk-${count.index}-${storage_data_disk.value}"
@@ -81,7 +82,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
     }
   }

-  dynamic storage_data_disk {
+  dynamic "storage_data_disk" {
     for_each = var.extra_disks
     content {
       name              = "${var.vm_hostname}-extradisk-${count.index}-${storage_data_disk.value.name}"
@@ -102,15 +103,15 @@ resource "azurerm_virtual_machine" "vm-linux" {
   os_profile_linux_config {
     disable_password_authentication = var.enable_ssh_key

-    dynamic ssh_keys {
+    dynamic "ssh_keys" {
       for_each = var.enable_ssh_key ? local.ssh_keys : []
       content {
         path     = "/home/${var.admin_username}/.ssh/authorized_keys"
         key_data = file(ssh_keys.value)
       }
     }

-    dynamic ssh_keys {
+    dynamic "ssh_keys" {
       for_each = var.enable_ssh_key ? var.ssh_key_values : []
       content {
         path     = "/home/${var.admin_username}/.ssh/authorized_keys"
@@ -150,14 +151,14 @@ resource "azurerm_virtual_machine" "vm-windows" {
   delete_os_disk_on_termination = var.delete_os_disk_on_termination
   license_type                  = var.license_type

-  dynamic identity {
+  dynamic "identity" {
     for_each = length(var.identity_ids) == 0 && var.identity_type == "SystemAssigned" ? [var.identity_type] : []
     content {
       type = var.identity_type
     }
   }

-  dynamic identity {
+  dynamic "identity" {
     for_each = length(var.identity_ids) > 0 || var.identity_type == "UserAssigned" ? [var.identity_type] : []
     content {
       type         = var.identity_type
@@ -178,9 +179,10 @@ resource "azurerm_virtual_machine" "vm-windows" {
     create_option     = "FromImage"
     caching           = "ReadWrite"
     managed_disk_type = var.storage_account_type
+    disk_size_gb      = var.os_disk_size_gb
   }

-  dynamic storage_data_disk {
+  dynamic "storage_data_disk" {
     for_each = range(var.nb_data_disk)
     content {
       name              = "${var.vm_hostname}-datadisk-${count.index}-${storage_data_disk.value}"
@@ -191,7 +193,7 @@ resource "azurerm_virtual_machine" "vm-windows" {
     }
   }

-  dynamic storage_data_disk {
+  dynamic "storage_data_disk" {
     for_each = var.extra_disks
     content {
       name              = "${var.vm_hostname}-extradisk-${count.index}-${storage_data_disk.value.name}"
---
os/outputs.tf
@@ -3,7 +3,7 @@ output "calculated_value_os_publisher" {
 }

 output "calculated_value_os_offer" {
-  value =element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 1)
+  value = element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 1)
 }

 output "calculated_value_os_sku" {
---
variables.tf
@@ -246,3 +246,9 @@ variable "os_profile_secrets" {
   type        = list(map(string))
   default     = []
 }
+
+variable "os_disk_size_gb" {
+  description = "OS Disk size in GB."
+  type        = number
+  default     = 30
+}
---

---

Choice B:
main.tf
@@ -30,7 +30,7 @@ resource "azurerm_storage_account" "vm-sa" {
 }

 resource "azurerm_virtual_machine" "vm-linux" {
-  count                            = ! contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && ! var.is_windows_image ? var.nb_instances : 0
+  count                            = !contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && !var.is_windows_image ? var.nb_instances : 0
   name                             = "${var.vm_hostname}-vmLinux-${count.index}"
   resource_group_name              = data.azurerm_resource_group.vm.name
   location                         = coalesce(var.location, data.azurerm_resource_group.vm.location)
@@ -40,14 +40,14 @@ resource "azurerm_virtual_machine" "vm-linux" {
   delete_os_disk_on_termination    = var.delete_os_disk_on_termination
   delete_data_disks_on_termination = var.delete_data_disks_on_termination

-  dynamic identity {
+  dynamic "identity" {
     for_each = length(var.identity_ids) == 0 && var.identity_type == "SystemAssigned" ? [var.identity_type] : []
     content {
       type = var.identity_type
     }
   }

-  dynamic identity {
+  dynamic "identity" {
     for_each = length(var.identity_ids) > 0 || var.identity_type == "UserAssigned" ? [var.identity_type] : []
     content {
       type         = var.identity_type
@@ -68,9 +68,10 @@ resource "azurerm_virtual_machine" "vm-linux" {
     create_option     = "FromImage"
     caching           = "ReadWrite"
     managed_disk_type = var.storage_account_type
+    disk_size_gb      = var.os_disk_size_gb
   }

-  dynamic storage_data_disk {
+  dynamic "storage_data_disk" {
     for_each = range(var.nb_data_disk)
     content {
       name              = "${var.vm_hostname}-datadisk-${count.index}-${storage_data_disk.value}"
@@ -81,7 +82,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
     }
   }

-  dynamic storage_data_disk {
+  dynamic "storage_data_disk" {
     for_each = var.extra_disks
     content {
       name              = "${var.vm_hostname}-extradisk-${count.index}-${storage_data_disk.value.name}"
@@ -102,15 +103,15 @@ resource "azurerm_virtual_machine" "vm-linux" {
   os_profile_linux_config {
     disable_password_authentication = var.enable_ssh_key

-    dynamic ssh_keys {
+    dynamic "ssh_keys" {
       for_each = var.enable_ssh_key ? local.ssh_keys : []
       content {
         path     = "/home/${var.admin_username}/.ssh/authorized_keys"
         key_data = file(ssh_keys.value)
       }
     }

-    dynamic ssh_keys {
+    dynamic "ssh_keys" {
       for_each = var.enable_ssh_key ? var.ssh_key_values : []
       content {
         path     = "/home/${var.admin_username}/.ssh/authorized_keys"
@@ -150,14 +151,14 @@ resource "azurerm_virtual_machine" "vm-windows" {
   delete_os_disk_on_termination = var.delete_os_disk_on_termination
   license_type                  = var.license_type

-  dynamic identity   dynamic "identity" {
     for_each = length(var.identity_ids) == 0 && var.identity_type == "SystemAssigned" ? [var.identity_type] : []
     content {
       type = var.identity_type
     }
   }

-  dynamic identity {
+  dynamic "identity" {
     for_each = length(var.identity_ids) > 0 || var.identity_type == "UserAssigned" ? [var.identity_type] : []
     content {
       type         = var.identity_type
@@ -178,9 +179,10 @@ resource "azurerm_virtual_machine" "vm-windows" {
     create_option     = "FromImage"
     caching           = "ReadWrite"
     managed_disk_type = var.storage_account_type
+    disk_size_gb      = var.os_disk_size_gb
   }

-  dynamic storage_data_disk {
+  dynamic "storage_data_disk" {
     for_each = range(var.nb_data_disk)
     content {
       name              = "${var.vm_hostname}-datadisk-${count.index}-${storage_data_disk.value}"
@@ -191,7 +193,7 @@ resource "azurerm_virtual_machine" "vm-windows" {
     }
   }

-  dynamic storage_data_disk {
+  dynamic "storage_data_disk" {
     for_each = var.extra_disks
     content {
       name              = "${var.vm_hostname}-extradisk-${count.index}-${storage_data_disk.value.name}"
---
os/outputs.tf
@@ -3,7 +3,7 @@ output "calculated_value_os_publisher" {
 }

 output "calculated_value_os_offer" {
-  value =element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 1)
+  value = element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 1)
 }

 output "calculated_value_os_sku" {
---
variables.tf
@@ -246,3 +246,9 @@ variable "os_profile_secrets" {
   type        = list(map(string))
   default     = []
 }
+
+variable "os_disk_size_gb" {
+  description = "OS Disk size in GB."
+  type        = number
+  default     = 30
+}
---

---

Choice C:
main.tf
@@ -30,7 +30,7 @@ resource "azurerm_storage_account" "vm-sa" {
 }

 resource "azurerm_virtual_machine" "vm-linux" {
-  count                            = ! contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && ! var.is_windows_image ? var.nb_instances : 0
+  count                            = !contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && !var.is_windows_image ? var.nb_instances : 0
   name                             = "${var.vm_hostname}-vmLinux-${count.index}"
   resource_group_name              = data.azurerm_resource_group.vm.name
   location                         = coalesce(var.location, data.azurerm_resource_group.vm.location)
@@ -40,14 +40,14 @@ resource "azurerm_virtual_machine" "vm-linux" {
   delete_os_disk_on_termination    = var.delete_os_disk_on_termination
   delete_data_disks_on_termination = var.delete_data_disks_on_termination

-  dynamic identity {
+  dynamic "identity" {
     for_each = length(var.identity_ids) == 0 && var.identity_type == "SystemAssigned" ? [var.identity_type] : []
     content {
       type = var.identity_type
     }
   }

-  dynamic identity {
+  dynamic "identity" {
     for_each = length(var.identity_ids) > 0 || var.identity_type == "UserAssigned" ? [var.identity_type] : []
     content {
       type         = var.identity_type
@@ -68,9 +68,10 @@ resource "azurerm_virtual_machine" "vm-linux" {
     create_option     = "FromImage"
     caching           = "ReadWrite"
     managed_disk_type = var.storage_account_type
+    disk_size_gb      = var.os_disk_size_gb
   }

-  dynamic storage_data_disk {
+  dynamic "storage_data_disk" {
     for_each = range(var.nb_data_disk)
     content {
       name              = "${var.vm_hostname}-datadisk-${count.index}-${storage_data_disk.value}"
@@ -81,7 +82,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
     }
   }

-  dynamic storage_data_disk {
+  dynamic "storage_data_disk" {
     for_each = var.extra_disks
     content {
       name              = "${var.vm_hostname}-extradisk-${count.index}-${storage_data_disk.value.name}"
@@ -102,15 +103,15 @@ resource "azurerm_virtual_machine" "vm-linux" {
   os_profile_linux_config {
     disable_password_authentication = var.enable_ssh_key

-    dynamic ssh_keys {
+    dynamic "ssh_keys" {
       for_each = var.enable_ssh_key ? local.ssh_keys : []
       content {
         path     = "/home/${var.admin_username}/.ssh/authorized_keys"
         key_data = file(ssh_keys.value)
       }
     }

-    dynamic ssh_keys {
+    dynamic "ssh_keys" {
       for_each = var.enable_ssh_key ? var.ssh_key_values : []
       content {
         path     = "/home/${var.admin_username}/.ssh/authorized_keys"
@@ -150,14 +151,14 @@ resource "azurerm_virtual_machine" "vm-windows" {
   delete_os_disk_on_termination = var.delete_os_disk_on_termination
   license_type                  = var.license_type

-  dynamic identity {
+  dynamic "identity" {
     for_each = length(var.identity_ids) == 0 && var.identity_type == "SystemAssigned" ? [var.identity_type] : []
     content {
       type = var.identity_type
     }
   }

-  dynamic identity {
+  dynamic "identity" {
     for_each = length(var.identity_ids) > 0 || var.identity_type == "UserAssigned" ? [var.identity_type] : []
     content {
       type         = var.identity_type
@@ -178,9 +179,10 @@ resource "azurerm_virtual_machine" "vm-windows" {
     create_option     = "FromImage"
     caching           = "ReadWrite"
     managed_disk_type = var.storage_account_type
+    disk_size_gb      = var.os_disk_size_gb
   }

-  dynamic storage_data_disk {
+  dynamic "storage_data_disk" {
     for_each = range(var.nb_data_disk)
     content {
       name              = "${var.vm_hostname}-datadisk-${count.index}-${storage_data_disk.value}"
@@ -191,7 +193,7 @@ resource "azurerm_virtual_machine" "vm-windows" {
  file(ssh_keys.value)
   }
   }

-  dynamic storage_data_disk {
+  dynamic "storage_data_disk" {
     for_each = var.extra_disks
     content {
       name              = "${var.vm_hostname}-extradisk-${count.index}-${storage_data_disk.value.name}"
---
os/outputs.tf
@@ -3,7 +3,7 @@ output "calculated_value_os_publisher" {
 }

 output "calculated_value_os_offer" {
-  value =element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 1)
+  value = element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 1)
 }

 output "calculated_value_os_sku" {
---
variables.tf
@@ -246,3 +246,9 @@ variable "os_profile_secrets" {
   type        = list(map(string))
   default     = []
 }
+
+variable "os_disk_size_gb" {
+  description = "OS Disk size in GB."
+  type        = number
+  default     = 30
+}
---

---

Choice D:
main.tf
@@ -30,7 +30,7 @@ resource "azurerm_storage_account" "vm-sa" {
 }

 resource "azurerm_virtual_machine" "vm-linux" {
-  count                   ==         = ! contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && ! var.is_windows_image ? var.nb_instances : 0
+  count                            = !contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && !var.is_windows_image ? var.nb_instances : 0
   name                             = "${var.vm_hostname}-vmLinux-${count.index}"
   resource_group_name              = data.azurerm_resource_group.vm.name
   location                         = coalesce(var.location, data.azurerm_resource_group.vm.location)
@@ -40,14 +40,14 @@ resource "azurerm_virtual_machine" "vm-linux" {
   delete_os_disk_on_termination    = var.delete_os_disk_on_termination
   delete_data_disks_on_termination = var.delete_data_disks_on_termination

-  dynamic identity {
+  dynamic "identity" {
     for_each = length(var.identity_ids) == 0 && var.identity_type == "SystemAssigned" ? [var.identity_type] : []
     content {
       type = var.identity_type
     }
   }

-  dynamic identity {
+  dynamic "identity" {
     for_each = length(var.identity_ids) > 0 || var.identity_type == "UserAssigned" ? [var.identity_type] : []
     content {
       type         = var.identity_type
@@ -68,9 +68,10 @@ resource "azurerm_virtual_machine" "vm-linux" {
     create_option     = "FromImage"
     caching           = "ReadWrite"
     managed_disk_type = var.storage_account_type
+    disk_size_gb      = var.os_disk_size_gb
   }

-  dynamic storage_data_disk {
+  dynamic "storage_data_disk" {
     for_each = range(var.nb_data_disk)
     content {
       name              = "${var.vm_hostname}-datadisk-${count.index}-${storage_data_disk.value}"
@@ -81,7 +82,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
     }
   }

-  dynamic storage_data_disk {
+  dynamic "storage_data_disk" {
     for_each = var.extra_disks
     content {
       name              = "${var.vm_hostname}-extradisk-${count.index}-${storage_data_disk.value.name}"
@@ -102,15 +103,15 @@ resource "azurerm_virtual_machine" "vm-linux" {
   os_profile_linux_config {
     disable_password_authentication = var.enable_ssh_key

-    dynamic ssh_keys {
+    dynamic "ssh_keys" {
       for_each = var.enable_ssh_key ? local.ssh_keys : []
       content {
         path     = "/home/${var.admin_username}/.ssh/authorized_keys"
         key_data = file(ssh_keys.value)
       }
     }

-    dynamic ssh_keys {
+    dynamic "ssh_keys" {
       for_each = var.enable_ssh_key ? var.ssh_key_values : []
       content {
         path     = "/home/${var.admin_username}/.ssh/authorized_keys"
@@ -150,14 +151,14 @@ resource "azurerm_virtual_machine" "vm-windows" {
   delete_os_disk_on_termination = var.delete_os_disk_on_termination
   license_type                  = var.license_type

-  dynamic identity {
+  dynamic "identity" {
     for_each = length(var.identity_ids) == 0 && var.identity_type == "SystemAssigned" ? [var.identity_type] : []
     content {
       type = var.identity_type
     }
   }

-  dynamic identity {
+  dynamic "identity" {
     for_each = length(var.identity_ids) > 0 || var.identity_type == "UserAssigned" ? [var.identity_type] : []
     content {
       type         = var.identity_type
@@ -178,9 +179,10 @@ resource "azurerm_virtual_machine" "vm-windows" {
     create_option     = "FromImage"
     caching           = "ReadWrite"
     managed_disk_type = var.storage_account_type
+    disk_size_gb      = var.os_disk_size_gb
   }

-  dynamic storage_data_disk {
+  dynamic "storage_data_disk" {
     for_each = range(var.nb_data_disk)
     content {
       name              = "${var.vm_hostname}-datadisk-${count.index}-${storage_data_disk.value}"
@@ -191,7 +193,7 @@ resource "azurerm_virtual_machine" "vm-windows" {
     }
   }

-  dynamic storage_data_disk {
+  dynamic "storage_data_disk" {
     for_each = var.extra_disks
     content {
       name              = "${var.vm_hostname}-extradisk-${count.index}-${storage_data_disk.value.name}"
---
os/outputs.tf
@@ -3,7 +3,7 @@ output "calculated_value_os_publisher" {
 }

 output "calculated_value_os_offer" {
-  value =element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 1)
+  value = element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 1)
 }

 output "calculated_value_os_sku" {
---
variables.tf
@@ -246,3 +246,9 @@ variable "os_profile_secrets" {
   type        = list(map(string))
   default     = []
 }
+
+variable "os_disk_size_gb" {
+  description = "OS Disk size in GB."
+  type        = number
+  default     = 30
+}
---

---


Choose the best Terraform patch (A/B/C/D) that implements the requested Azure Compute change safely. Only respond with a single uppercase letter.

Task Description:
<!---
Please add this into the test of test/fixture, format the changes by "terraform fmt", and test it by run the following:
```sh
$ docker build --build-arg BUILD_ARM_SUBSCRIPTION_ID=$ARM_SUBSCRIPTION_ID --build-arg BUILD_ARM_CLIENT_ID=$ARM_CLIENT_ID --build-arg BUILD_ARM_CLIENT_SECRET=$ARM_CLIENT_SECRET --build-arg BUILD_ARM_TENANT_ID=$ARM_TENANT_ID -t azure-compute .
$ docker run --rm azure-compute /bin/bash -c "bundle install && rake full"
```

Please add this into the example usage of README.md and format the changes by "terrafmt fmt README.md". Please intall "terrafmt" by [install terrafmt](https://github.com/katbyte/terrafmt#install).
--->

Fixes #000

Changes proposed in the pull request:

---

Choice A:
README.md
@@ -4,6 +4,8 @@

 ## Deploys 1+ Virtual Machines to your provided VNet

+### TRestEtet
+
 This Terraform module deploys Virtual Machines in Azure with the following characteristics:

 - Ability to specify a simple string Deploys get the [latest marketplace image](https://docs.microsoft.com/cli/azure/vm/image?view=azure-cli-latest) using `var.vm_os_simple`
---

---

Choice B:
README.md
@@ -4,6 +4,8 @@

 ## Deploys 1+ Virtual Machines to your provided VNet

+### TRestEtet
+
 This Terraform module deploys Virtual Machines in Azure with the following characteristics:

 - Ability to specify a simple string to get the [latest marketplace image](https://docs.microsoft.com/cli/azure/vm/image?view=azure-cli-latest) using `var.vm_os_simple`
---

---

Choice C:
README.md
@@ -4,6 +4,8 @@

 ## Deploys 1+ Virtual Machines to your provided VNet

+### This
+
 This Terraform module deploys Virtual Machines in Azure with the following characteristics:

 - Ability to specify a simple string to get the [latest marketplace image](https://docs.microsoft.com/cli/azure/vm/image?view=azure-cli-latest) using `var.vm_os_simple`
---

---

Choice D:
README.md
@@ -4,6 +4,8 @@

 ## Deploys 1+ Virtual Machines to your provided VNet

+### TRestEtet
+
 This Terraform module deploys Virtual Machines in Azure with the following characteristics:

 - Ability to specify 1+ simple string to get the [latest marketplace image](https://docs.microsoft.com/cli/azure/vm/image?view=azure-cli-latest) using `var.vm_os_simple`
---

---