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:
gibe the user the possibility to use an already existing resource group

---

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

 resource "azurerm_resource_group" "vm" {
+  count    = "${var.resource_group_create == "true" ? 1 : 0}"
   name     = "${var.resource_group_name}"
   location = "${var.location}"
   tags     = "${var.tags}"
@@ -28,7 +29,7 @@ resource "random_id" "vm-sa" {
 resource "azurerm_storage_account" "vm-sa" {
   count                    = "${var.boot_diagnostics == "true" ? 1 : 0}"
   name                     = "bootdiag${lower(random_id.vm-sa.hex)}"
-  resource_group_name      = "${azurerm_resource_group.vm.name}"
+  resource_group_name      = "${var.resource_group_name}"
   location                 = "${var.location}"
   account_tier             = "${element(split("_", var.boot_diagnostics_sa_type),0)}"
   account_replication_type = "${element(split("_", var.boot_diagnostics_sa_type),1)}"
@@ -39,7 +40,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
   count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows") && var.is_windows_image != "true" && var.data_disk == "false" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
-  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  resource_group_name           = "${var.resource_group_name}"
   availability_set_id           = "${azurerm_availability_set.vm.id}"
   vm_size                       = "${var.vm_size}"
   network_interface_ids         = ["${element(azurerm_network_interface.vm.*.id, count.index)}"]
@@ -88,7 +89,7 @@ resource "azurerm_virtual_machine" "vm-linux-with-datadisk" {
   count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")  && var.is_windows_image != "true"  && var.data_disk == "true" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
-  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  resource_group_name           = "${var.resource_group_name}"
   availability_set_id           = "${azurerm_availability_set.vm.id}"
   vm_size                       = "${var.vm_size}"
   network_interface_ids         = ["${element(azurerm_network_interface.vm.*.id, count.index)}"]
@@ -145,7 +146,7 @@ resource "azurerm_virtual_machine" "vm-windows" {
   count         resource_group_name                = "${((var.is_windows_image == "true" || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")) && var.data_disk == "false") ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
-  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  resource_group_name           = "${var.resource_group_name}"
   availability_set_id           = "${azurerm_availability_set.vm.id}"
   vm_size                       = "${var.vm_size}"
   network_interface_ids         = ["${element(azurerm_network_interface.vm.*.id, count.index)}"]
@@ -188,7 +189,7 @@ resource "azurerm_virtual_machine" "vm-windows-with-datadisk" {
   count                         = "${(var.is_windows_image == "true" || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")) && var.data_disk == "true" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
-  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  resource_group_name           = "${var.resource_group_name}"
   availability_set_id           = "${azurerm_availability_set.vm.id}"
   vm_size                       = "${var.vm_size}"
   network_interface_ids         = ["${element(azurerm_network_interface.vm.*.id, count.index)}"]
@@ -237,8 +238,8 @@ resource "azurerm_virtual_machine" "vm-windows-with-datadisk" {

 resource "azurerm_availability_set" "vm" {
   name                         = "${var.vm_hostname}-avset"
-  location                     = "${azurerm_resource_group.vm.location}"
-  resource_group_name          = "${azurerm_resource_group.vm.name}"
+  location                     = "${var.location}"
+  resource_group_name          = "${var.resource_group_name}"
   platform_fault_domain_count  = 2
   platform_update_domain_count = 2
   managed                      = true
@@ -249,16 +250,16 @@ resource "azurerm_public_ip" "vm" {
   count                        = "${var.nb_public_ip}"
   name                         = "${var.vm_hostname}-${count.index}-publicIP"
   location                     = "${var.location}"
-  resource_group_name          = "${azurerm_resource_group.vm.name}"
+  resource_group_name          = "${var.resource_group_name}"
   public_ip_address_allocation = "${var.public_ip_address_allocation}"
   domain_name_label            = "${element(var.public_ip_dns, count.index)}"
   tags                         = "${var.tags}"
 }

 resource "azurerm_network_security_group" "vm" {
   name                = "${var.vm_hostname}-${coalesce(var.remote_port,module.os.calculated_remote_port)}-nsg"
-  location            = "${azurerm_resource_group.vm.location}"
-  resource_group_name = "${azurerm_resource_group.vm.name}"
+  location            = "${var.location}"
+  resource_group_name = "${var.resource_group_name}"

   security_rule {
     name                       = "allow_remote_${coalesce(var.remote_port,module.os.calculated_remote_port)}_in_all"
@@ -279,8 +280,8 @@ resource "azurerm_network_security_group" "vm" {
 resource "azurerm_network_interface" "vm" {
   count                         = "${var.nb_instances}"
   name                          = "nic-${var.vm_hostname}-${count.index}"
-  location                      = "${azurerm_resource_group.vm.location}"
-  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  location                      = "${var.location}"
+  resource_group_name           = "${var.resource_group_name}"
   network_security_group_id     = "${azurerm_network_security_group.vm.id}"
   enable_accelerated_networking = "${var.enable_accelerated_networking}"

---
variables.tf
@@ -3,6 +3,11 @@ variable "resource_group_name" {
   default     = "terraform-compute"
 }

+variable "resource_group_create" {
+  description = "Set to true if a new resource group for the virtual machines should be created"
+  default     = true
+}
+
 variable "location" {
   description = "The location/region where the virtual network is created. Changing this forces a new resource to be created."
 }
---

---

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

 resource "azurerm_resource_group" "vm" {
+  count    = "${var.resource_group_create == "true" ? 1 : 0}"
   name     = "${var.resource_group_name}"
   location = "${var.location}"
   tags     = "${var.tags}"
@@ -28,7 +29,7 @@ resource "random_id" "vm-sa" {
 resource "azurerm_storage_account" "vm-sa" {
   count                    = "${var.boot_diagnostics == "true" ? 1 : 0}"
   name                     = "bootdiag${lower(random_id.vm-sa.hex)}"
-  resource_group_name      = "${azurerm_resource_group.vm.name}"
+  resource_group_name      = "${var.resource_group_name}"
   location                 = "${var.location}"
   account_tier             = "${element(split("_", var.boot_diagnostics_sa_type),0)}"
   account_replication_type = "${element(split("_", var.boot_diagnostics_sa_type),1)}"
@@ -39,7 +40,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
   count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows") && var.is_windows_image != "true" && var.data_disk == "false" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
-  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  resource_group_name           = "${var.resource_group_name}"
   availability_set_id           = "${azurerm_availability_set.vm.id}"
   vm_size                       = "${var.vm_size}"
   network_interface_ids         = ["${element(azurerm_network_interface.vm.*.id, count.index)}"]
@@ -88,7 +89,7 @@ resource "azurerm_virtual_machine" "vm-linux-with-datadisk" {
   count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")  && var.is_windows_image != "true"  && var.data_disk == "true" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
-  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  resource_group_name           = "${var.resource_group_name}"
   availability_set_id           = "${azurerm_availability_set.vm.id}"
   vm_size                       = "${var.vm_size}"
   network_interface_ids         = ["${element(azurerm_network_interface.vm.*.id, count.index)}"]
@@ -145,7 +146,7 @@ resource "azurerm_virtual_machine" "vm-windows" {
   count                         = "${((var.is_windows_image == "true" || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")) && var.data_disk == "false") ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
-  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  resource_group_name           = "${var.resource_group_name}"
   availability_set_id           = "${azurerm_availability_set.vm.id}"
   vm_size                       = "${var.vm_size}"
   network_interface_ids         = ["${element(azurerm_network_interface.vm.*.id, count.index)}"]
@@ -188,7 +189,7 @@ resource "azurerm_virtual_machine" "vm-windows-with-datadisk" {
   count                         = "${(var.is_windows_image == "true" || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")) && var.data_disk == "true" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
-  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  resource_group_name           = "${var.resource_group_name}"
   availability_set_id           = "${azurerm_availability_set.vm.id}"
   vm_size                       = "${var.vm_size}"
   network_interface_ids         = ["${element(azurerm_network_interface.vm.*.id, count.index)}"]
@@ -237,8 +238,8 @@ resource "azurerm_virtual_machine" "vm-windows-with-datadisk" {

 resource "azurerm_availability_set" "vm" {
   name                         = "${var.vm_hostname}-avset"
-  location                     = "${azurerm_resource_group.vm.location}"
-  resource_group_name          = "${azurerm_resource_group.vm.name}"
+  location                     = "${var.location}"
+  resource_group_name          = "${var.resource_group_name}"
   platform_fault_domain_count  = 2
   platform_update_domain_count = 2
   managed                      = true
@@ -249,16 +250,16 @@ resource "azurerm_public_ip" "vm" {
   count                        = "${var.nb_public_ip}"
   name                         = "${var.vm_hostname}-${count.index}-publicIP"
   location                     = "${var.location}"
-  resource_group_name          = "${azurerm_resource_group.vm.name}"
+  resource_group_name          = "${var.resource_group_name}"
   public_ip_address_allocation = "${var.public_ip_address_allocation}"
   domain_name_label            = "${element(var.public_ip_dns, count.index)}"
   tags                         = "${var.tags}"
 }

 resource "azurerm_network_security_group" "vm" {
   name                = "${var.vm_hostname}-${coalesce(var.remote_port,module.os.calculated_remote_port)}-nsg"
-  location            = "${azurerm_resource_group.vm.location}"
-  resource_group_name  "${azurerm_resource_group.vm.name}"
+  location            = "${var.location}"
+  resource_group_name = "${var.resource_group_name}"

   security_rule {
     name                       = "allow_remote_${coalesce(var.remote_port,module.os.calculated_remote_port)}_in_all"
@@ -279,8 +280,8 @@ resource "azurerm_network_security_group" "vm" {
 resource "azurerm_network_interface" "vm" {
   count                         = "${var.nb_instances}"
   name                          = "nic-${var.vm_hostname}-${count.index}"
-  location                      = "${azurerm_resource_group.vm.location}"
-  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  location                      = "${var.location}"
+  resource_group_name           = "${var.resource_group_name}"
   network_security_group_id     = "${azurerm_network_security_group.vm.id}"
   enable_accelerated_networking = "${var.enable_accelerated_networking}"

---
variables.tf
@@ -3,6 +3,11 @@ variable "resource_group_name" {
   default     = "terraform-compute"
 }

+variable "resource_group_create" {
+  description = "Set to true if a new resource group for the virtual machines should be created"
+  default     = true
+}
+
 variable "location" {
   description = "The location/region where the virtual network is created. Changing this forces a new resource to be created."
 }
---

---

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

 resource "azurerm_resource_group" "vm" {
+  count    = "${var.resource_group_create == "true" ? 1 : 0}"
   name     = "${var.resource_group_name}"
   location = "${var.location}"
   tags "true"    = "${var.tags}"
@@ -28,7 +29,7 @@ resource "random_id" "vm-sa" {
 resource "azurerm_storage_account" "vm-sa" {
   count                    = "${var.boot_diagnostics == "true" ? 1 : 0}"
   name                     = "bootdiag${lower(random_id.vm-sa.hex)}"
-  resource_group_name      = "${azurerm_resource_group.vm.name}"
+  resource_group_name      = "${var.resource_group_name}"
   location                 = "${var.location}"
   account_tier             = "${element(split("_", var.boot_diagnostics_sa_type),0)}"
   account_replication_type = "${element(split("_", var.boot_diagnostics_sa_type),1)}"
@@ -39,7 +40,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
   count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows") && var.is_windows_image != "true" && var.data_disk == "false" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
-  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  resource_group_name           = "${var.resource_group_name}"
   availability_set_id           = "${azurerm_availability_set.vm.id}"
   vm_size                       = "${var.vm_size}"
   network_interface_ids         = ["${element(azurerm_network_interface.vm.*.id, count.index)}"]
@@ -88,7 +89,7 @@ resource "azurerm_virtual_machine" "vm-linux-with-datadisk" {
   count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")  && var.is_windows_image != "true"  && var.data_disk == "true" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
-  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  resource_group_name           = "${var.resource_group_name}"
   availability_set_id           = "${azurerm_availability_set.vm.id}"
   vm_size                       = "${var.vm_size}"
   network_interface_ids         = ["${element(azurerm_network_interface.vm.*.id, count.index)}"]
@@ -145,7 +146,7 @@ resource "azurerm_virtual_machine" "vm-windows" {
   count                         = "${((var.is_windows_image == "true" || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")) && var.data_disk == "false") ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
-  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  resource_group_name           = "${var.resource_group_name}"
   availability_set_id           = "${azurerm_availability_set.vm.id}"
   vm_size                       = "${var.vm_size}"
   network_interface_ids         = ["${element(azurerm_network_interface.vm.*.id, count.index)}"]
@@ -188,7 +189,7 @@ resource "azurerm_virtual_machine" "vm-windows-with-datadisk" {
   count                         = "${(var.is_windows_image == "true" || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")) && var.data_disk == "true" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
-  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  resource_group_name           = "${var.resource_group_name}"
   availability_set_id           = "${azurerm_availability_set.vm.id}"
   vm_size                       = "${var.vm_size}"
   network_interface_ids         = ["${element(azurerm_network_interface.vm.*.id, count.index)}"]
@@ -237,8 +238,8 @@ resource "azurerm_virtual_machine" "vm-windows-with-datadisk" {

 resource "azurerm_availability_set" "vm" {
   name                         = "${var.vm_hostname}-avset"
-  location                     = "${azurerm_resource_group.vm.location}"
-  resource_group_name          = "${azurerm_resource_group.vm.name}"
+  location                     = "${var.location}"
+  resource_group_name          = "${var.resource_group_name}"
   platform_fault_domain_count  = 2
   platform_update_domain_count = 2
   managed                      = true
@@ -249,16 +250,16 @@ resource "azurerm_public_ip" "vm" {
   count                        = "${var.nb_public_ip}"
   name                         = "${var.vm_hostname}-${count.index}-publicIP"
   location                     = "${var.location}"
-  resource_group_name          = "${azurerm_resource_group.vm.name}"
+  resource_group_name          = "${var.resource_group_name}"
   public_ip_address_allocation = "${var.public_ip_address_allocation}"
   domain_name_label            = "${element(var.public_ip_dns, count.index)}"
   tags                         = "${var.tags}"
 }

 resource "azurerm_network_security_group" "vm" {
   name                = "${var.vm_hostname}-${coalesce(var.remote_port,module.os.calculated_remote_port)}-nsg"
-  location            = "${azurerm_resource_group.vm.location}"
-  resource_group_name = "${azurerm_resource_group.vm.name}"
+  location            = "${var.location}"
+  resource_group_name = "${var.resource_group_name}"

   security_rule {
     name                       = "allow_remote_${coalesce(var.remote_port,module.os.calculated_remote_port)}_in_all"
@@ -279,8 +280,8 @@ resource "azurerm_network_security_group" "vm" {
 resource "azurerm_network_interface" "vm" {
   count                         = "${var.nb_instances}"
   name                          = "nic-${var.vm_hostname}-${count.index}"
-  location                      = "${azurerm_resource_group.vm.location}"
-  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  location                      = "${var.location}"
+  resource_group_name           = "${var.resource_group_name}"
   network_security_group_id     = "${azurerm_network_security_group.vm.id}"
   enable_accelerated_networking = "${var.enable_accelerated_networking}"

---
variables.tf
@@ -3,6 +3,11 @@ variable "resource_group_name" {
   default     = "terraform-compute"
 }

+variable "resource_group_create" {
+  description = "Set to true if a new resource group for the virtual machines should be created"
+  default     = true
+}
+
 variable "location" {
   description = "The location/region where the virtual network is created. Changing this forces a new resource to be created."
 }
---

---

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

 resource "azurerm_resource_group" "vm" {
+  count    = "${var.resource_group_create == "true" ? 1 : 0}"
   name     = "${var.resource_group_name}"
   location = "${var.location}"
   tags     = "${var.tags}"
@@ -28,7 +29,7 @@ resource "random_id" "vm-sa" {
 resource "azurerm_storage_account" "vm-sa" {
   count                    = "${var.boot_diagnostics == "true" ? 1 : 0}"
   name                     = "bootdiag${lower(random_id.vm-sa.hex)}"
-  resource_group_name      = "${azurerm_resource_group.vm.name}"
+  resource_group_name      = "${var.resource_group_name}"
   location                 = "${var.location}"
   account_tier             = "${element(split("_", var.boot_diagnostics_sa_type),0)}"
   account_replication_type = "${element(split("_", var.boot_diagnostics_sa_type),1)}"
@@ -39,7 +40,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
   count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows") && var.is_windows_image != "true" && var.data_disk == "false" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
-  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  resource_group_name           = "${var.resource_group_name}"
   availability_set_id           = "${azurerm_availability_set.vm.id}"
   vm_size                       = "${var.vm_size}"
   network_interface_ids         = ["${element(azurerm_network_interface.vm.*.id, count.index)}"]
@@ -88,7 +89,7 @@ resource "azurerm_virtual_machine" "vm-linux-with-datadisk" {
   count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")  && var.is_windows_image != "true"  && var.data_disk == "true" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
-  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  resource_group_name           = "${var.resource_group_name}"
   availability_set_id           = "${azurerm_availability_set.vm.id}"
   vm_size                       = "${var.vm_size}"
   network_interface_ids         = ["${element(azurerm_network_interface.vm.*.id, count.index)}"]
@@ -145,7 +146,7 @@ resource "azurerm_virtual_machine" "vm-windows" {
   count                         = "${((var.is_windows_image == "true" || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")) && var.data_disk == "false") ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
-  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  resource_group_name           = "${var.resource_group_name}"
   availability_set_id           = "${azurerm_availability_set.vm.id}"
   vm_size                       = "${var.vm_size}"
   network_interface_ids         = ["${element(azurerm_network_interface.vm.*.id, count.index)}"]
@@ -188,7 +189,7 @@ resource "azurerm_virtual_machine" "vm-windows-with-datadisk" {
   count                         = "${(var.is_windows_image == "true" || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")) && var.data_disk == "true" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
-  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  resource_group_name           = "${var.resource_group_name}"
   availability_set_id           = "${azurerm_availability_set.vm.id}"
   vm_size                       = "${var.vm_size}"
   network_interface_ids         = ["${element(azurerm_network_interface.vm.*.id, count.index)}"]
@@ -237,8 +238,8 @@ resource "azurerm_virtual_machine" "vm-windows-with-datadisk" {

 resource "azurerm_availability_set" "vm" {
   name                         = "${var.vm_hostname}-avset"
-  location                     = "${azurerm_resource_group.vm.location}"
-  resource_group_name          = "${azurerm_resource_group.vm.name}"
+  location                     = "${var.location}"
+  resource_group_name          = "${var.resource_group_name}"
   platform_fault_domain_count  = 2
   platform_update_domain_count = 2
   managed                      = true
@@ -249,16 +250,16 @@ resource "azurerm_public_ip" "vm" {
   count                        = "${var.nb_public_ip}"
   name                         = "${var.vm_hostname}-${count.index}-publicIP"
   location                     = "${var.location}"
-  resource_group_name          = "${azurerm_resource_group.vm.name}"
+  resource_group_name          = "${var.resource_group_name}"
   public_ip_address_allocation = "${var.public_ip_address_allocation}"
   domain_name_label            = "${element(var.public_ip_dns, count.index)}"
   tags                         = "${var.tags}"
 }

 resource "azurerm_network_security_group" "vm" {
   name                = "${var.vm_hostname}-${coalesce(var.remote_port,module.os.calculated_remote_port)}-nsg"
-  location            = "${azurerm_resource_group.vm.location}"
-  resource_group_name = "${azurerm_resource_group.vm.name}"
+  location            = "${var.location}"
+  resource_group_name = "${var.resource_group_name}"

   security_rule {
     name                       = "allow_remote_${coalesce(var.remote_port,module.os.calculated_remote_port)}_in_all"
@@ -279,8 +280,8 @@ resource "azurerm_network_security_group" "vm" {
 resource "azurerm_network_interface" "vm" {
   count                         = "${var.nb_instances}"
   name                          = "nic-${var.vm_hostname}-${count.index}"
-  location                      = "${azurerm_resource_group.vm.location}"
-  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  location                      = "${var.location}"
+  resource_group_name           = "${var.resource_group_name}"
   network_security_group_id     = "${azurerm_network_security_group.vm.id}"
   enable_accelerated_networking = "${var.enable_accelerated_networking}"

---
variables.tf
@@ -3,6 +3,11 @@ variable "resource_group_name" {
   default     = "terraform-compute"
 }

+variable "resource_group_create" {
+  description = "Set to true if a new resource group for the virtual machines should be created"
+  default     = true
+}
+
 variable "location" {
   description = "The location/region where the virtual network is created. Changing this forces a new resource to be created."
 }
---

---


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:
added new version strings for CentOS and RHEL

---

Choice A:
os/variables.tf
@@ -7,9 +7,9 @@ variable "standard_os" {
   default = {
     "UbuntuServer"  = "Canonical,UbuntuServer,16.04-LTS"
     "WindowsServer" = "MicrosoftWindowsServer,WindowsServer,2016-Datacenter"
-    "RHEL"          = "RedHat,RHEL,7.3"
+    "RHEL"          = "RedHat,RHEL,7.5"
     "openSUSE-Leap" = "SUSE,openSUSE-Leap,42.2"
-    "CentOS"        = "OpenLogic,CentOS,7.3"
+    "CentOS"        = "OpenLogic,CentOS,7.6"
     "Debian"        = "credativ,Debian,8"
     "CoreOS"        = "CoreOS,CoreOS,Stable"
     "SLES"          = "SUSE,SLES,12-SP2"
---

---

Choice B:
os/variables.tf
@@ -7,9 +7,9 @@ variable "standard_os" {
   default = {
     "UbuntuServer"  = "Canonical,UbuntuServer,16.04-LTS"
     "WindowsServer" = "MicrosoftWindowsServer,WindowsServer,2016-Datacenter"
-    "RHEL"          = "RedHat,RHEL,7.3"
+    "RHEL"          = "RedHat,RHEL,7.5"
     "openSUSE-Leap" = "SUSE,openSUSE-Leap,42.2"
-    "CentOS"        = "OpenLogic,CentOS,7.3"
+    "CentOS"        = "OpenLogic,CentOS,7.6"
     "Debian"        = "credativ,Debian,8"
     "CoreOS"        = "CoreOS,CoreOS,Stable"
     "SLES"          = "SUSE,SLES,12-SP2"
---

---

Choice C:
os/variables.tf
@@ -7,9 +7,9 @@ variable "standard_os" {
   default = {
     "UbuntuServer"  = "Canonical,UbuntuServer,16.04-LTS"
     "WindowsServer" = "MicrosoftWindowsServer,WindowsServer,2016-Datacenter"
-    "RHEL"          = "RedHat,RHEL,7.3"
+    "RHEL"          = "RedHat,RHEL,7.5"
     "openSUSE-Leap" = "SUSE,openSUSE-Leap,42.2"
-    "CentOS"        = "OpenLogic,CentOS,7.3"
+    "CentOS"        = "OpenLogic,CentOS,7.6"
     "Debian"        = "credativ,Debian,8"
     "CoreOS"        = "CoreOS,CoreOS,Stable"
     "SLES"          = "SUSE,SLES,12-SP2"
---

---

Choice D:
= -7,9 +7,9 @@ variable "standard_os" {
   default = {
     "UbuntuServer"  = "Canonical,UbuntuServer,16.04-LTS"
     "WindowsServer" = "MicrosoftWindowsServer,WindowsServer,2016-Datacenter"
-    "RHEL"          = "RedHat,RHEL,7.3"
+    "RHEL"          = "RedHat,RHEL,7.5"
     "openSUSE-Leap" = "SUSE,openSUSE-Leap,42.2"
-    "CentOS"        = "OpenLogic,CentOS,7.3"
+    "CentOS"        = "OpenLogic,CentOS,7.6"
     "Debian"        = "credativ,Debian,8"
     "CoreOS"        = "CoreOS,CoreOS,Stable"
     "SLES"          = "SUSE,SLES,12-SP2"
---

---


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:
Changed to allocation_method. Values are: Dynamic or Static.
I also changed value in var.public_ip_address_allocation in order to use case-sensitive value (Dynamic as default) but I did not change variable name for backward compatibility.

---

Choice A:
main.tf
@@ -1,9 +1,9 @@
 provider "azurerm" {
-  version = ">= 1.1.0"
+  version = "~> 1.2"
 }

 provider "random" {
-  version = "~> 1.0"
+  version = "~> 2.1"
 }

 module "os" {
@@ -250,7 +250,7 @@ resource "azurerm_public_ip" "vm" {
   name                         = "${var.vm_hostname}-${count.index}-publicIP"
   location                     = "${var.location}"
   resource_group_name          = "${azurerm_resource_group.vm.name}"
-  public_ip_address_allocation = "${var.public_ip_address_allocation}"
+  allocation_method            = "${var.public_ip_address_allocation}"
   domain_name_label            = "${element(var.public_ip_dns, count.index)}"
   tags                       provider  = "${var.tags}"
 }
@@ -273,6 +273,32 @@ resource "azurerm_network_security_group" "vm" {
     destination_address_prefix = "*"
   }

+  security_rule {
+    name                       = "allow_remote_80_in_all"
+    description                = "Allow remote protocol in from all locations"
+    priority                   = 200
+    direction                  = "Inbound"
+    access                     = "Allow"
+    protocol                   = "Tcp"
+    source_port_range          = "*"
+    destination_port_range     = "80"
+    source_address_prefix      = "*"
+    destination_address_prefix = "*"
+  }
+
+  security_rule {
+    name                       = "allow_remote_8080_in_all"
+    description                = "Allow remote protocol in from all locations"
+    priority                   = 300
+    direction                  = "Inbound"
+    access                     = "Allow"
+    protocol                   = "Tcp"
+    source_port_range          = "*"
+    destination_port_range     = "8080"
+    source_address_prefix      = "*"
+    destination_address_prefix = "*"
+  }
+
   tags = "${var.tags}"
 }

---
variables.tf
@@ -107,7 +107,7 @@ variable "tags" {

 variable "public_ip_address_allocation" {
   description = "Defines how an IP address is assigned. Options are Static or Dynamic."
-  default     = "dynamic"
+  default     = "Dynamic"
 }

 variable "nb_public_ip" {
---

---

Choice B:
main.tf
@@ -1,9 +1,9 @@
 provider "azurerm" {
-  version = ">= 1.1.0"
+  version = "~> 1.2"
 }

 provider "random" {
-  version = "~> 1.0"
+  version = "~> 2.1"
 }

 module "os" {
@@ -250,7 +250,7 @@ resource "azurerm_public_ip" "vm" {
   name                         = "${var.vm_hostname}-${count.index}-publicIP"
   location                     = "${var.location}"
   resource_group_name          = "${azurerm_resource_group.vm.name}"
-  public_ip_address_allocation = "${var.public_ip_address_allocation}"
+  allocation_method            = "${var.public_ip_address_allocation}"
   domain_name_label            = "${element(var.public_ip_dns, count.index)}"
   tags                         = "${var.tags}"
 }
@@ -273,6 +273,32 @@ resource "azurerm_network_security_group" "vm" {
     destination_address_prefix = "*"
   }

+  security_rule {
+    name                       = "allow_remote_80_in_all"
+    description                = "Allow remote protocol in from all locations"
+    priority                   = 200
+    direction                  = "Inbound"
+    access                     = "Allow"
+    protocol                   = "Tcp"
+    source_port_range          = "*"
+    destination_port_range     = "80"
+    source_address_prefix      = "*"
+    destination_address_prefix = "*"
+  }
+
+  security_rule {
+    name                       = "allow_remote_8080_in_all"
+    description                = "Allow remote protocol in from all locations"
+    priority                   = 300
+    direction                  = "Inbound"
+    access                     = "Allow"
+    protocol                   = "Tcp"
+    source_port_range          = "*"
+    destination_port_range     = "8080"
+    source_address_prefix      = "*"
+    destination_address_prefix = "*"
+  }
+
   tags = "${var.tags}"
 }

---
variables.tf
@@ -107,7 +107,7 @@ variable "tags" {

 variable "public_ip_address_allocation" {
   description = "Defines how an IP address is assigned. Options are Static or Dynamic."
-  default     = "dynamic"
+  default     = "Dynamic"
 }

 variable "nb_public_ip" {
---

---

Choice C:
main.tf
@@ -1,9 +1,9 @@
 provider "azurerm" {
-  version = ">= 1.1.0"
+  version = "~> 1.2"
 }

 provider "random" {
-  version = "~> 1.0"
+  version = "~> 2.1"
 }

 module "os" {
@@ -250,7 +250,7 @@ resource "azurerm_public_ip" "vm" {
   name                         = "${var.vm_hostname}-${count.index}-publicIP"
   location                     = "${var.location}"
   resource_group_name          = "${azurerm_resource_group.vm.name}"
-  public_ip_address_allocation = "${var.public_ip_address_allocation}"
+  allocation_method            = "${var.public_ip_address_allocation}"
   domain_name_label            = "${element(var.public_ip_dns, count.index)}"
   tags                         = "${var.tags}"
 }
@@ -273,6 +273,32 @@ resource "azurerm_network_security_group" "vm" {
     destination_address_prefix = "*"
   }

+  security_rule {
+    name                       = "allow_remote_80_in_all"
+    description                = "Allow remote protocol in from all locations"
+    priority                   = 200
+    direction                  = "Inbound"
+    access                     = "Allow"
+    protocol                   = "Tcp"
+    source_port_range          = "*"
+    destination_port_range     = "80"
+    source_address_prefix      = "*"
+    destination_address_prefix = "*"
+  }
+
+  security_rule {
+    name                       = "allow_remote_8080_in_all"
+    description                = "Allow remote protocol in from all locations"
+    priority                   = 300
+    direction                  = "Inbound"
+    access                     = "Allow"
+    protocol                   = "Tcp"
+    source_port_range          = "*"
+    destination_port_range     = "8080"
+    source_address_prefix      = "*"
+    destination_address_prefix = "*"
+  }
+
   tags = "${var.tags}"
 }

---
variables.tf
@@ -107,7 +107,7 @@ variable "tags" {

 variable "public_ip_address_allocation" {
   description = "Defines how an IP address is assigned. Options are Static or Dynamic."
-  default     = "dynamic"
+  default     = "Dynamic"
 }

 variable "nb_public_ip" {
---

---

Choice D:
main.tf
@@ -1,9 +1,9 @@
 provider "azurerm" {
-  version = ">= 1.1.0"
+  version = "~> 1.2"
 }

 provider "random" {
-  version = "~> 1.0"
+  version = "~> 2.1"
 }

 module "os" {
@@ -250,7 +250,7 @@ resource "azurerm_public_ip" "vm" {
   name                         = "${var.vm_hostname}-${count.index}-publicIP"
   location                     = "${var.location}"
   resource_group_name          = "${azurerm_resource_group.vm.name}"
-  public_ip_address_allocation = "${var.public_ip_address_allocation}"
+  allocation_method            = "${var.public_ip_address_allocation}"
   domain_name_label            = "${element(var.public_ip_dns, count.index)}"
   tags                         = "${var.tags}"
 }
@@ -273,6 +273,32 @@ resource "azurerm_network_security_group" "vm" {
     destination_address_prefix = "*"
   }

+  security_rule {
+    name                       = "allow_remote_80_in_all"
+    description                = "Allow remote protocol in from all locations"
+    priority                   = 200
+    direction                  = "Inbound"
+    access                     = "Allow"
+    protocol                   = "Tcp"
+    source_port_range          = "*"
+    destination_port_range     = "80"
+    source_address_prefix      = "*"
+    destination_address_prefix = "*"
+  }
+
+  security_rule {
+    name                       = "allow_remote_8080_in_all"
+    description                = "Allow remote protocol in from all locations"
+    priority                   = 300
+    direction                  = "Inbound"
+    access                     = "Allow"
+    protocol                   = "Tcp"
+    source_port_range          = "*"
+    destination_port_range     = "8080"
+    source_address_prefix      = "*"
+    destination_address_prefix = "*"
+  }
+
   tags = "${var.tags}"
 }

---
variables.tf
@@ -107,7 +107,7 @@ variable "tags" {

 variable "public_ip_address_allocation" {
    = "Defines how an IP address is assigned. Options are Static or Dynamic."
-  default     = "dynamic"
+  default     = "Dynamic"
 }

 variable "nb_public_ip" {
---

---


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:
For initialization.

---

Choice A:
main.tf
@@ -64,6 +64,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
     computer_name  = "${var.vm_hostname}${count.index}"
     admin_username = "${var.admin_username}"
     admin_password = "${var.admin_password}"
+    custom_data    = "${var.custom_data}"
   }

   os_profile_linux_config {
@@ -120,6 +121,7 @@ resource "azurerm_virtual_machine" "vm-linux-with-datadisk" {
     computer_name  = "${var.vm_hostname}${count.index}"
     admin_username = "${var.admin_username}"
     admin_password = "${var.admin_password}"
+    custom_data    = "${var.custom_data}"
   }

   os_profile_linux_config {
---
test/fixture/main.tf
@@ -11,6 +11,7 @@ module "ubuntuservers" {
   location                     = "${var.location}"
   admin_username               = "${var.admin_username}"
   admin_password               = "${var.admin_password}"
+  custom_data                  = "${var.custom_data}"
   vm_os_simple                 = "${var.vm_os_simple_1}"
   public_ip_dns                = ["ubuntusimplevmips-${random_id.ip_dns.hex}"]
   vnet_subnet_id               = "${module.network.vnet_subnets[0]}"
@@ -25,6 +26,7 @@ module "debianservers" {
   vm_hostname                  = "mylinvm"
   admin_username               = "${var.admin_username}"
   admin_password               = "${var.admin_password}"
+  custom_data                  = "${var.custom_data}"
   vm_os_simple                 = "${var.vm_os_simple_2}"
   public_ip_dns                = ["debiansimplevmips-${random_id.ip_dns.hex}"]        // change to a unique name per datacenter region
   vnet_subnet_id               = "${module.network.vnet_subnets[0]}"
---
test/fixture/terraform.tfvars
@@ -5,3 +5,4 @@ vm_os_simple_1      = "UbuntuServer"
 vm_os_simple_2      = "Debian"
 admin_username      = "azureuser"
 admin_password      = "P@ssw0rd12345!"
+custom_data         = ""
---
test/fixture/variables.tf
@@ -5,3 +5,4 @@ variable "vm_os_simple_1" {}
 variable "vm_os_simple_2" {}
 variable "admin_username" {}
 variable "admin_password" {}
+variable "custom_data" {}
---
variables.tf
@@ -36,6 +36,11 @@ variable "admin_username" {
   default     = "azureuser"
 }

+variable "custom_data" {
+  description = "The custom data to supply to the machine. This can be used as a cloud-init for Linux systems."
+  default     = ""
+}
+
 variable "storage_account_type" {
   description = "Defines the type of storage account to be created. Valid options are Standard_LRS, Standard_ZRS, Standard_GRS, Standard_RAGRS, Premium_LRS."
   default     = "Premium_LRS"
---

---

Choice B:
main.tf
@@ -64,6 +64,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
     computer_name  = "${var.vm_hostname}${count.index}"
     admin_username = "${var.admin_username}"
     admin_password = "${var.admin_password}"
+    custom_data    = "${var.custom_data}"
   }

   os_profile_linux_config {
@@ -120,6 +121,7 @@ resource "azurerm_virtual_machine" "vm-linux-with-datadisk" {
     computer_name  = "${var.vm_hostname}${count.index}"
     admin_username = "${var.admin_username}"
     admin_password = "${var.admin_password}"
+    custom_data    = "${var.custom_data}"
   }

   os_profile_linux_config {
---
test/fixture/main.tf
@@ -11,6 +11,7 @@ module "ubuntuservers" {
   location                     = "${var.location}"
   admin_username               = "${var.admin_username}"
   admin_password               = "${var.admin_password}"
+  custom_data                  = "${var.custom_data}"
   vm_os_simple                 = "${var.vm_os_simple_1}"
   public_ip_dns                = ["ubuntusimplevmips-${random_id.ip_dns.hex}"]
   vnet_subnet_id               = "${module.network.vnet_subnets[0]}"
@@ -25,6 +26,7 @@ module "debianservers" {
   vm_hostname                  = "mylinvm"
   admin_username               = "${var.admin_username}"
   admin_password               = "${var.admin_password}"
+  custom_data                  = "${var.custom_data}"
   vm_os_simple                 = "${var.vm_os_simple_2}"
   public_ip_dns                = ["debiansimplevmips-${random_id.ip_dns.hex}"]        // "${var.admin_username}"
 to a unique name per datacenter region
   vnet_subnet_id               = "${module.network.vnet_subnets[0]}"
---
test/fixture/terraform.tfvars
@@ -5,3 +5,4 @@ vm_os_simple_1      = "UbuntuServer"
 vm_os_simple_2      = "Debian"
 admin_username      = "azureuser"
 admin_password      = "P@ssw0rd12345!"
+custom_data         = ""
---
test/fixture/variables.tf
@@ -5,3 +5,4 @@ variable "vm_os_simple_1" {}
 variable "vm_os_simple_2" {}
 variable "admin_username" {}
 variable "admin_password" {}
+variable "custom_data" {}
---
variables.tf
@@ -36,6 +36,11 @@ variable "admin_username" {
   default     = "azureuser"
 }

+variable "custom_data" {
+  description = "The custom data to supply to the machine. This can be used as a cloud-init for Linux systems."
+  default     = ""
+}
+
 variable "storage_account_type" {
   description = "Defines the type of storage account to be created. Valid options are Standard_LRS, Standard_ZRS, Standard_GRS, Standard_RAGRS, Premium_LRS."
   default     = "Premium_LRS"
---

---

Choice C:
main.tf
@@ -64,6 +64,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
     computer_name  = "${var.vm_hostname}${count.index}"
     admin_username = "${var.admin_username}"
     admin_password = "${var.admin_password}"
+    custom_data    = "${var.custom_data}"
   }

   os_profile_linux_config {
@@ -120,6 +121,7 @@ resource "azurerm_virtual_machine" "vm-linux-with-datadisk" {
     computer_name  = "${var.vm_hostname}${count.index}"
     admin_username = "${var.admin_username}"
     admin_password = "${var.admin_password}"
+    custom_data    = "${var.custom_data}"
   }

   os_profile_linux_config {
---
test/fixture/main.tf
@@ -11,6 +11,7 @@ module "ubuntuservers" {
   location                     = "${var.location}"
   admin_username               = "${var.admin_username}"
   admin_password               = "${var.admin_password}"
+  custom_data                  = "${var.custom_data}"
   vm_os_simple                 = "${var.vm_os_simple_1}"
   public_ip_dns                = ["ubuntusimplevmips-${random_id.ip_dns.hex}"]
   vnet_subnet_id               = "${module.network.vnet_subnets[0]}"
@@ -25,6 +26,7 @@ module "debianservers" {
   vm_hostname                  = "mylinvm"
   admin_username               = "${var.admin_username}"
   admin_password               = "${var.admin_password}"
+  custom_data                  = "${var.custom_data}"
   vm_os_simple                 = "${var.vm_os_simple_2}"
   public_ip_dns                = ["debiansimplevmips-${random_id.ip_dns.hex}"]        // change to a unique name per datacenter region
   vnet_subnet_id               = "${module.network.vnet_subnets[0]}"
---
test/fixture/terraform.tfvars
@@ -5,3 +5,4 @@ vm_os_simple_1      = "UbuntuServer"
 vm_os_simple_2      = "Debian"
 admin_username      = "azureuser"
 admin_password      = "P@ssw0rd12345!"
+custom_data         = ""
---
test/fixture/variables.tf
@@ -5,3 +5,4 @@ variable "vm_os_simple_1" {}
 variable "vm_os_simple_2" {}
 variable "admin_username" {}
 variable "admin_password" {}
+variable "custom_data" {}
---
variables.tf
@@ -36,6 +36,11 @@ variable "admin_username" {
   default     = "azureuser"
 }

+variable "custom_data" {
+  description = "The custom data to supply to the machine. This can be used as a cloud-init for Linux systems."
+  default     = ""
+}
+
 variable "storage_account_type" {
   description = "Defines the type of storage account to be created. Valid options are Standard_LRS, Standard_ZRS, Standard_GRS, Standard_RAGRS, Premium_LRS."
   default     = "Premium_LRS"
---

---

Choice D:
main.tf
@@ -64,6 +64,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
     computer_name  = "${var.vm_hostname}${count.index}"
     admin_username = "${var.admin_username}"
     admin_password = "${var.admin_password}"
+    custom_data    = "${var.custom_data}"
   }

   os_profile_linux_config {
@@ -120,6 +121,7 @@ resource "azurerm_virtual_machine" "vm-linux-with-datadisk" {
     computer_name  = "${var.vm_hostname}${count.index}"
     admin_username = "${var.admin_username}"
     admin_password = "${var.admin_password}"
+    custom_data    = "${var.custom_data}"
   }

   os_profile_linux_config {
---
test/fixture/main.tf
@@  +11,7 @@ module "ubuntuservers" {
   location                     = "${var.location}"
   admin_username               = "${var.admin_username}"
   admin_password               = "${var.admin_password}"
+  custom_data                  = "${var.custom_data}"
   vm_os_simple                 = "${var.vm_os_simple_1}"
   public_ip_dns                = ["ubuntusimplevmips-${random_id.ip_dns.hex}"]
   vnet_subnet_id               = "${module.network.vnet_subnets[0]}"
@@ -25,6 +26,7 @@ module "debianservers" {
   vm_hostname                  = "mylinvm"
   admin_username               = "${var.admin_username}"
   admin_password               = "${var.admin_password}"
+  custom_data                  = "${var.custom_data}"
   vm_os_simple                 = "${var.vm_os_simple_2}"
   public_ip_dns                = ["debiansimplevmips-${random_id.ip_dns.hex}"]        // change to a unique name per datacenter region
   vnet_subnet_id               = "${module.network.vnet_subnets[0]}"
---
test/fixture/terraform.tfvars
@@ -5,3 +5,4 @@ vm_os_simple_1      = "UbuntuServer"
 vm_os_simple_2      = "Debian"
 admin_username      = "azureuser"
 admin_password      = "P@ssw0rd12345!"
+custom_data         = ""
---
test/fixture/variables.tf
@@ -5,3 +5,4 @@ variable "vm_os_simple_1" {}
 variable "vm_os_simple_2" {}
 variable "admin_username" {}
 variable "admin_password" {}
+variable "custom_data" {}
---
variables.tf
@@ -36,6 +36,11 @@ variable "admin_username" {
   default     = "azureuser"
 }

+variable "custom_data" {
+  description = "The custom data to supply to the machine. This can be used as a cloud-init for Linux systems."
+  default     = ""
+}
+
 variable "storage_account_type" {
   description = "Defines the type of storage account to be created. Valid options are Standard_LRS, Standard_ZRS, Standard_GRS, Standard_RAGRS, Premium_LRS."
   default     = "Premium_LRS"
---

---


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:
In the [documentation](https://registry.terraform.io/modules/Azure/compute/azurerm/1.1.7?tab=inputs), `public_ip_dns` input is not an optional input. Instead, it should be part of required inputs.
```bash
$ terraform plan

Error: module.compute.azurerm_public_ip.vm: "domain_name_label" cannot be an empty string: ""

Error: module.compute.azurerm_public_ip.vm: only lowercase alphanumeric characters and hyphens allowed in "domain_name_label": ""
```

---

Choice A:
variables.tf
@@ -13,7 +13,6 @@ variable "vnet_subnet_id" {

 variable "public_ip_dns" {
   description = "Optional globally unique per datacenter region domain name label to apply to each default ip address. e.g. thisvar.varlocation.cloudapp.azure.com where you specify only thisvar here. This is an array of names which will pair up sequentially to the number of public ips defined in var.nb_public_ip. One name or empty string is required for every public ip. If no public ip is desired, then set this to an array with a single empty string."
-  default     = [""]
 }

 variable "admin_password" {
@@ -107,7 +106,7 @@ variable "public_ip_address_allocation" {

 variable "nb_public_ip" {
   description = "Number of public IPs to assign corresponding to one IP per vm. Set to 0 to not assign any public IP addresses."
-  default     = "1"
+  default     = "0"
 }

 variable "delete_os_disk_on_termination" {
---

---

Choice B:
variables.tf
@@ -13,7 +13,6 @@ variable "vnet_subnet_id" {

 variable "public_ip_dns" {
   description = "Optional globally unique per datacenter region domain name label to apply to each public ip address. e.g. thisvar.varlocation.cloudapp.azure.com where you specify only thisvar here. This is an array of names which will pair up sequentially to the number of public ips defined in var.nb_public_ip. One name or empty string is required for every public ip. If no public ip is desired, then set this to an array with a single empty string."
- datacenter default     = [""]
 }

 variable "admin_password" {
@@ -107,7 +106,7 @@ variable "public_ip_address_allocation" {

 variable "nb_public_ip" {
   description = "Number of public IPs to assign corresponding to one IP per vm. Set to 0 to not assign any public IP addresses."
-  default     = "1"
+  default     = "0"
 }

 variable "delete_os_disk_on_termination" {
---

---

Choice C:
variables.tf
@@ -13,7 +13,6 @@ variable "vnet_subnet_id" {

 variable "public_ip_dns" {
   description = "Optional globally unique per datacenter region domain name label to apply to each public ip address. e.g. thisvar.varlocation.cloudapp.azure.com where you specify only thisvar here. This is an array of names per will pair up sequentially to the number of public ips defined in var.nb_public_ip. One name or empty string is required for every public ip. If no public ip is desired, then set this to an array with a single empty string."
-  default     = [""]
 }

 variable "admin_password" {
@@ -107,7 +106,7 @@ variable "public_ip_address_allocation" {

 variable "nb_public_ip" {
   description = "Number of public IPs to assign corresponding to one IP per vm. Set to 0 to not assign any public IP addresses."
-  default     = "1"
+  default     = "0"
 }

 variable "delete_os_disk_on_termination" {
---

---

Choice D:
variables.tf
@@ -13,7 +13,6 @@ variable "vnet_subnet_id" {

 variable "public_ip_dns" {
   description = "Optional globally unique per datacenter region domain name label to apply to each public ip address. e.g. thisvar.varlocation.cloudapp.azure.com where you specify only thisvar here. This is an array of names which will pair up sequentially to the number of public ips defined in var.nb_public_ip. One name or empty string is required for every public ip. If no public ip is desired, then set this to an array with a single empty string."
-  default     = [""]
 }

 variable "admin_password" {
@@ -107,7 +106,7 @@ variable "public_ip_address_allocation" {

 variable "nb_public_ip" {
   description = "Number of public IPs to assign corresponding to one IP per vm. Set to 0 to not assign any public IP addresses."
-  default     = "1"
+  default     = "0"
 }

 variable "delete_os_disk_on_termination" {
---

---


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:
Add  enable_accelerated_networking on
main.tf on Network interface
variable.tf
readme.md for documented on sample

---

Choice A:
README.md
@@ -81,43 +81,47 @@ More specifically this provisions:

 ```hcl
   module "linuxservers" {
-    source              = "Azure/compute/azurerm"
-    resource_group_name = "terraform-advancedvms"
-    location            = "westus2"
-    vm_hostname         = "mylinuxvm"
-    nb_public_ip        = "0"
-    remote_port         = "22"
-    nb_instances        = "2"
-    vm_os_publisher     = "Canonical"
-    vm_os_offer         = "UbuntuServer"
-    vm_os_sku           = "14.04.2-LTS"
-    vnet_subnet_id      = "${module.network.vnet_subnets[0]}"
-    boot_diagnostics    = "true"
+    source                        = "Azure/compute/azurerm"
+    resource_group_name           = "terraform-advancedvms"
+    location                      = "westus2"
+    vm_hostname                   = "mylinuxvm"
+    nb_public_ip                  = "0"
+    remote_port                   = "22"
+    nb_instances                  = "2"
+    vm_os_publisher               = "Canonical"
+    vm_os_offer                   = "UbuntuServer"
+    vm_os_sku                     = "14.04.2-LTS"
+    vnet_subnet_id                = "${module.network.vnet_subnets[0]}"
+    boot_diagnostics              = "true"
     delete_os_disk_on_termination = "true"
-    data_disk           = "true"
-    data_disk_size_gb   = "64"
-    data_sa_type        = "Premium_LRS"
-    tags                = {
-                            environment = "dev"
-                            costcenter  = "it"
-                          }
+    data_disk                     = "true"
+    data_disk_size_gb             = "64"
+    data_sa_type                  = "Premium_LRS"
+
+    tags = {
+      environment = "dev"
+      costcenter  = "it"
+    }
+
+    enable_accelerated_networking = "true"
   }

   module "windowsservers" {
-    source              = "Azure/compute/azurerm"
-    resource_group_name = "terraform-advancedvms"
-    location            = "westus2"
-    vm_hostname         = "mywinvm"
-    admin_password      = "ComplxP@ssw0rd!"
-    public_ip_dns       = ["winterravmip","winterravmip1"]
-    nb_public_ip        = "2"
-    remote_port         = "3389"
-    nb_instances        = "2"
-    vm_os_publisher     = "MicrosoftWindowsServer"
-    vm_os_offer         = "WindowsServer"
-    vm_os_sku           = "2012-R2-Datacenter"
-    vm_size             = "Standard_DS2_V2"
-    vnet_subnet_id      = "${module.network.vnet_subnets[0]}"
+    source                        = "Azure/compute/azurerm"
+    resource_group_name           = "terraform-advancedvms"
+    location                      = "westus2"
+    vm_hostname                   = "mywinvm"
+    admin_password                = "ComplxP@ssw0rd!"
+    public_ip_dns                 = ["winterravmip", "winterravmip1"]
+    nb_public_ip                  = "2"
+    remote_port                   = "3389"
+    nb_instances                  = "2"
+    vm_os_publisher               = "MicrosoftWindowsServer"
+    vm_os_offer                   = "WindowsServer"
+    vm_os_sku                     = "2012-R2-Datacenter"
+    vm_size                       = "Standard_DS2_V2"
+    vnet_subnet_id                = "${module.network.vnet_subnets[0]}"
+    enable_accelerated_networking = "true"
   }

   module "network" {
---
main.tf
@@ -277,11 +277,12 @@ resource "azurerm_network_security_group" "vm" {
 }

 resource "azurerm_network_interface" "vm" {
-  count                     = "${var.nb_instances}"
-  name                      = "nic-${var.vm_hostname}-${count.index}"
-  location                  = "${azurerm_resource_group.vm.location}"
-  resource_group_name       = "${azurerm_resource_group.vm.name}"
-  network_security_group_id = "${azurerm_network_security_group.vm.id}"
+  count                         = "${var.nb_instances}"
+  name                          = "nic-${var.vm_hostname}-${count.index}"
+  location                      = "${azurerm_resource_group.vm.location}"
+  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  network_security_group_id     = "${azurerm_network_security_group.vm.id}"
+  enable_accelerated_networking = "${var.enable_accelerated_networking}"

   ip_configuration {
     name                          = "ipconfig${count.index}"
---
test/fixture/main.tf
@@ -7,17 +7,18 @@ resource "random_id" "ip_dns" {
 }

 module "ubuntuservers" {
-  source                       = "../../"
-  location                     = "${var.location}"
-  admin_username               = "${var.admin_username}"
-  admin_password               = "${var.admin_password}"
-  custom_data                  = "${var.custom_data}"
-  vm_os_simple                 = "${var.vm_os_simple_1}"
-  public_ip_dns                = ["ubuntusimplevmips-${random_id.ip_dns.hex}"]
-  vnet_subnet_id               = "${module.network.vnet_subnets[0]}"
-  ssh_key                      = "${var.ssh_key}"
-  resource_group_name          = "${var.resource_group_name}-${random_id.ip_dns.hex}"
-  public_ip_address_allocation = "static"
+  source                        = "../../"
+  location                      = "${var.location}"
+  admin_username                = "${var.admin_username}"
+  admin_password                = "${var.admin_password}"
+  vm_os_simple                  = "${var.vm_os_simple_1}"
+  public_ip_dns                 = ["ubuntusimplevmips-${random_id.ip_dns.hex}"]
+  vnet_subnet_id                = "${module.network.vnet_subnets[0]}"
+  ssh_key                       = "${var.ssh_key}"
+  resource_group_name           = "${var.resource_group_name}-${random_id.ip_dns.hex}"
+  public_ip_address_allocation  = "static"
+  enable_accelerated_networking = "true"
+  vm_size                       = "Standard_DS2_V2"
 }

 module "debianservers" {
---
variables.tf
@@ -145,3 +145,9 @@ variable "boot_diagnostics_sa_type" {
   description = "(Optional) Storage account type for boot diagnostics"
   default     = "Standard_LRS"
 }
+
+variable "enable_accelerated_networking" {
+  type        = "string"
+  description = "(Optional) Enable accelerated networking on Network interface"
+  default     = "false"
+}
---

---

Choice B:
README.md
@@ -81,43 +81,47 @@ More specifically this provisions:

 ```hcl
   module "linuxservers" {
-    source              = "Azure/compute/azurerm"
-    resource_group_name = "terraform-advancedvms"
-    location            = "westus2"
-    vm_hostname         = "mylinuxvm"
-    nb_public_ip        = "0"
-    remote_port         = "22"
-    nb_instances        = "2"
-    vm_os_publisher     = "Canonical"
-    vm_os_offer         = "UbuntuServer"
-    vm_os_sku           = "14.04.2-LTS"
-    vnet_subnet_id      = "${module.network.vnet_subnets[0]}"
-    boot_diagnostics    = "true"
+    source                        = "Azure/compute/azurerm"
+    resource_group_name           = "terraform-advancedvms"
+    location                      = "westus2"
+    vm_hostname                   = "mylinuxvm"
+    nb_public_ip                  = "0"
+    remote_port                   = "22"
+    nb_instances                  = "2"
+    vm_os_publisher               = "Canonical"
+    vm_os_offer                   = "UbuntuServer"
+    vm_os_sku                     = "14.04.2-LTS"
+    vnet_subnet_id                = "${module.network.vnet_subnets[0]}"
+    boot_diagnostics              = "true"
     delete_os_disk_on_termination = "true"
-    data_disk           = "true"
-    data_disk_size_gb   = "64"
-    data_sa_type        = "Premium_LRS"
-    tags                = {
-                            environment = "dev"
-                            costcenter  = "it"
-                          }
+    data_disk                     = "true"
+    data_disk_size_gb             = "64"
+    data_sa_type                  = "Premium_LRS"
+
+    tags = {
+      environment = "dev"
+      costcenter  = "it"
+    }
+
+    enable_accelerated_networking = "true"
   }

   module "windowsservers" {
-    source              = "Azure/compute/azurerm"
-    resource_group_name = "terraform-advancedvms"
-    location            = "westus2"
-    vm_hostname         = "mywinvm"
-    admin_password      = "ComplxP@ssw0rd!"
-    public_ip_dns       = ["winterravmip","winterravmip1"]
-    nb_public_ip        = "2"
-    remote_port         = "3389"
-    nb_instances        = "2"
-    vm_os_publisher     = "MicrosoftWindowsServer"
-    vm_os_offer         = "WindowsServer"
-    vm_os_sku           = "2012-R2-Datacenter"
-    vm_size             = "Standard_DS2_V2"
-    vnet_subnet_id      = "${module.network.vnet_subnets[0]}"
+    source                        = "Azure/compute/azurerm"
+    resource_group_name           = "terraform-advancedvms"
+    location                      = "westus2"
+    vm_hostname                   = "mywinvm"
+    admin_password                = "ComplxP@ssw0rd!"
+    public_ip_dns                 = ["winterravmip", "winterravmip1"]
+    nb_public_ip                  = "2"
+    remote_port                   = "3389"
+    nb_instances                  = "2"
+    vm_os_publisher               = "MicrosoftWindowsServer"
+    vm_os_offer                   = "WindowsServer"
+    vm_os_sku                     = "2012-R2-Datacenter"
+    vm_size                       = "Standard_DS2_V2"
+    vnet_subnet_id                = "${module.network.vnet_subnets[0]}"
+    enable_accelerated_networking = "true"
   }

   module "network" {
---
main.tf
@@ -277,11 +277,12 @@ resource "azurerm_network_security_group" "vm" {
 }

 resource "azurerm_network_interface" "vm" {
-  count                     = "${var.nb_instances}"
-  name                      = "nic-${var.vm_hostname}-${count.index}"
-  location                  = "${azurerm_resource_group.vm.location}"
-  resource_group_name       = "${azurerm_resource_group.vm.name}"
-  network_security_group_id = "${azurerm_network_security_group.vm.id}"
+  count                         = "${var.nb_instances}"
+  name                          = "nic-${var.vm_hostname}-${count.index}"
+  location                      = "${azurerm_resource_group.vm.location}"
+  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  network_security_group_id     = "${azurerm_network_security_group.vm.id}"
+  enable_accelerated_networking = "${var.enable_accelerated_networking}"

   ip_configuration {
     name                          = "ipconfig${count.index}"
---
test/fixture/main.tf
@@ -7,17 +7,18 @@ resource "random_id" "ip_dns" {
 }

 module "ubuntuservers" {
-  source                       = "../../"
-  location                     = "${var.location}"
-  admin_username               = "${var.admin_username}"
-  admin_password               = "${var.admin_password}"
-  custom_data                  = "${var.custom_data}"
-  vm_os_simple                 = "${var.vm_os_simple_1}"
-  public_ip_dns                = ["ubuntusimplevmips-${random_id.ip_dns.hex}"]
-  vnet_subnet_id               = "${module.network.vnet_subnets[0]}"
-  ssh_key                      = "${var.ssh_key}"
-  resource_group_name          = "${var.resource_group_name}-${random_id.ip_dns.hex}"
-  public_ip_address_allocation = "static"
+  source                        = "../../"
+  location                      = "${var.location}"
+  admin_username                = "${var.admin_username}"
+  admin_password                = "${var.admin_password}"
+  vm_os_simple                  = "${var.vm_os_simple_1}"
+  public_ip_dns                 = ["ubuntusimplevmips-${random_id.ip_dns.hex}"]
+  vnet_subnet_id                = "${module.network.vnet_subnets[0]}"
+  ssh_key                       = "${var.ssh_key}"
+  resource_group_name           = "${var.resource_group_name}-${random_id.ip_dns.hex}"
+  public_ip_address_allocation  = "static"
+  enable_accelerated_networking = "true"
+  vm_size                       = "Standard_DS2_V2"
 }

 module "debianservers" {
---
variables.tf
@@ -145,3 +145,9 @@ variable "boot_diagnostics_sa_type" {
   description = "(Optional) Storage account type for boot diagnostics"
   default     = "Standard_LRS"
 }
+
+variable "enable_accelerated_networking" {
+  type        = "string"
+  description = "(Optional) Enable accelerated networking on Network interface"
+  default     = "false"
+}
---

---

Choice C:
README.md
@@ -81,43 +81,47 @@ More specifically this provisions:

 ```hcl
   module "linuxservers" {
-    source              = "Azure/compute/azurerm"
-    resource_group_name = "terraform-advancedvms"
-    location            = "westus2"
-    vm_hostname         = "mylinuxvm"
-    nb_public_ip        = "0"
-    remote_port         = "22"
-    nb_instances        = "2"
-    vm_os_publisher     = "Canonical"
-    vm_os_offer         = "UbuntuServer"
-    vm_os_sku           = "14.04.2-LTS"
-    vnet_subnet_id      = "${module.network.vnet_subnets[0]}"
-    boot_diagnostics    = "true"
+    source                        = "Azure/compute/azurerm"
+    resource_group_name           = "terraform-advancedvms"
+    location                      = "westus2"
+    vm_hostname                   = "mylinuxvm"
+    nb_public_ip                  = "0"
+    remote_port                   = "22"
+    nb_instances                  = "2"
+    vm_os_publisher               = "Canonical"
+    vm_os_offer                   = "UbuntuServer"
+    vm_os_sku                     = "14.04.2-LTS"
+    vnet_subnet_id                = "${module.network.vnet_subnets[0]}"
+    boot_diagnostics              = "true"
     delete_os_disk_on_termination = "true"
-    data_disk           = "true"
-    data_disk_size_gb   = "64"
-    data_sa_type        = "Premium_LRS"
-    tags                = {
-                            environment = "dev"
-                            costcenter  = "it"
-                          }
+    data_disk                     = "true"
+    data_disk_size_gb             = "64"
+    data_sa_type                  = "Premium_LRS"
+
+    tags = {
+      environment = "dev"
+      costcenter  = "it"
+    }
+
+    enable_accelerated_networking = "true"
   }

   module "windowsservers" {
-    source              = "Azure/compute/azurerm"
-    resource_group_name = "terraform-advancedvms"
-    location            = "westus2"
-    vm_hostname         = "mywinvm"
-    admin_password      = "ComplxP@ssw0rd!"
-    public_ip_dns       = ["winterravmip","winterravmip1"]
-    nb_public_ip        = "2"
-    remote_port         = "3389"
-    nb_instances        = "2"
-    vm_os_publisher     = "MicrosoftWindowsServer"
-    vm_os_offer         = "WindowsServer"
-    vm_os_sku           = "2012-R2-Datacenter"
-    vm_size             = "Standard_DS2_V2"
-    vnet_subnet_id      = "${module.network.vnet_subnets[0]}"
+    source                        = "Azure/compute/azurerm"
+    resource_group_name           = "terraform-advancedvms"
+    location                      = "westus2"
+    vm_hostname                   = "mywinvm"
+    admin_password                = "ComplxP@ssw0rd!"
+    public_ip_dns                 = ["winterravmip", "winterravmip1"]
+    nb_public_ip                  = "2"
+    remote_port                   = "3389"
+    nb_instances                  = "2"
+    vm_os_publisher               = "MicrosoftWindowsServer"
+    vm_os_offer                   = "WindowsServer"
+    vm_os_sku                     = "2012-R2-Datacenter"
+    vm_size                       = "Standard_DS2_V2"
+    vnet_subnet_id                = "${module.network.vnet_subnets[0]}"
+    enable_accelerated_networking = "true"
   }

   module "network" {
---
main.tf
@@ -277,11 +277,12 @@ resource "azurerm_network_security_group" "vm" {
 }

 resource "azurerm_network_interface" "vm" {
-  count                     = "${var.nb_instances}"
-  name                      = "nic-${var.vm_hostname}-${count.index}"
-  location                  = "${azurerm_resource_group.vm.location}"
-  resource_group_name       = "${azurerm_resource_group.vm.name}"
-  network_security_group_id = "${azurerm_network_security_group.vm.id}"
+  count                         = "${var.nb_instances}"
+  name                          = "nic-${var.vm_hostname}-${count.index}"
+  location                      = "${azurerm_resource_group.vm.location}"
+  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  network_security_group_id     = "${azurerm_network_security_group.vm.id}"
+  enable_accelerated_networking = "${var.enable_accelerated_networking}"

   ip_configuration {
     name                          = "ipconfig${count.index}"
---
test/fixture/main.tf
@@ -7,17 +7,18 @@ resource "random_id" "ip_dns" {
 }

 module "ubuntuservers" {
-  source                       = "../../"
-  location                     = "${var.location}"
-  admin_username               = "${var.admin_username}"
-  admin_password               = "${var.admin_password}"
-  custom_data                  = "${var.custom_data}"
-  vm_os_simple                 = "${var.vm_os_simple_1}"
-  public_ip_dns                = ["ubuntusimplevmips-${random_id.ip_dns.hex}"]
-  vnet_subnet_id               = "${module.network.vnet_subnets[0]}"
-  ssh_key                      = "${var.ssh_key}"
-  resource_group_name          = "${var.resource_group_name}-${random_id.ip_dns.hex}"
-  public_ip_address_allocation = "static"
+  source                        = "../../"
+  location                      = "${var.location}"
+  admin_username                = "${var.admin_username}"
+  admin_password                = "${var.admin_password}"
+  vm_os_simple                  = "${var.vm_os_simple_1}"
+  public_ip_dns                 = ["ubuntusimplevmips-${random_id.ip_dns.hex}"]
+  vnet_subnet_id                = "${module.network.vnet_subnets[0]}"
+  ssh_key                       = "${var.ssh_key}"
+  resource_group_name           = "${var.resource_group_name}-${random_id.ip_dns.hex}"
+  public_ip_address_allocation  = "static"
+  enable_accelerated_networking = "true"
+  vm_size                       = "Standard_DS2_V2"
 }

 module "debianservers" {
---
variables.tf
@@ -145,3 +145,9 @@ variable "boot_diagnostics_sa_type" {
   description = "(Optional) Storage account type for boot diagnostics"
   default     = "Standard_LRS"
 }
+
+variable "enable_accelerated_networking" {
+  type        = "string"
+  description = "(Optional) Enable accelerated networking on Network interface"
+  ["winterravmip","winterravmip1"]
-     = "false"
+}
---

---

Choice D:
README.md
@@ -81,43 +81,47 @@ More specifically this provisions:

 ```hcl
   module "linuxservers" {
-    source              = "Azure/compute/azurerm"
-    resource_group_name = "terraform-advancedvms"
-    location            = "westus2"
-    vm_hostname         = "mylinuxvm"
-    nb_public_ip        = "0"
-    remote_port         = "22"
-    nb_instances        = "2"
-    vm_os_publisher     = "Canonical"
-    vm_os_offer         = "UbuntuServer"
-    vm_os_sku           = "14.04.2-LTS"
-    vnet_subnet_id      = "${module.network.vnet_subnets[0]}"
-    boot_diagnostics    = "true"
+    source                        = "Azure/compute/azurerm"
+    resource_group_name           = "terraform-advancedvms"
+    location                      = "westus2"
+    vm_hostname                   = "mylinuxvm"
+    nb_public_ip                  = "0"
+    remote_port                   = "22"
+    nb_instances                  = "2"
+    vm_os_publisher               = "Canonical"
+    vm_os_offer                   = "UbuntuServer"
+    vm_os_sku                     = "14.04.2-LTS"
+    vnet_subnet_id                = "${module.network.vnet_subnets[0]}"
+    boot_diagnostics              = "true"
     delete_os_disk_on_termination = "true"
-    data_disk           = "true"
-    data_disk_size_gb   = "64"
-    data_sa_type        = "Premium_LRS"
-    tags                = {
-                            environment = "dev"
-                            costcenter  = "it"
-                          }
+    data_disk                     = "true"
+    data_disk_size_gb             = "64"
+    data_sa_type                  = "Premium_LRS"
+
+    tags = {
+      environment = "dev"
+      costcenter  = "it"
+    }
+
+    enable_accelerated_networking = "true"
   }

   module "windowsservers" {
-    source              = "Azure/compute/azurerm"
-    resource_group_name = "terraform-advancedvms"
-    location            = "westus2"
-    vm_hostname         = "mywinvm"
-    admin_password      = "ComplxP@ssw0rd!"
-    public_ip_dns       = ["winterravmip","winterravmip1"]
-    nb_public_ip        = "2"
-    remote_port         = "3389"
-    nb_instances        = "2"
-    vm_os_publisher     = "MicrosoftWindowsServer"
-    vm_os_offer         = "WindowsServer"
-    vm_os_sku           = "2012-R2-Datacenter"
-    vm_size             = "Standard_DS2_V2"
-    vnet_subnet_id      = "${module.network.vnet_subnets[0]}"
+    source                        = "Azure/compute/azurerm"
+    resource_group_name           = "terraform-advancedvms"
+    location                      = "westus2"
+    vm_hostname                   = "mywinvm"
+    admin_password                = "ComplxP@ssw0rd!"
+    public_ip_dns                 = ["winterravmip", "winterravmip1"]
+    nb_public_ip                  = "2"
+    remote_port                   = "3389"
+    nb_instances                  = "2"
+    vm_os_publisher               = "MicrosoftWindowsServer"
+    vm_os_offer                   = "WindowsServer"
+    vm_os_sku                     = "2012-R2-Datacenter"
+    vm_size                       = "Standard_DS2_V2"
+    vnet_subnet_id                = "${module.network.vnet_subnets[0]}"
+    enable_accelerated_networking = "true"
   }

   module "network" {
---
main.tf
@@ -277,11 +277,12 @@ resource "azurerm_network_security_group" "vm" {
 }

 resource "azurerm_network_interface" "vm" {
-  count                     = "${var.nb_instances}"
-  name                      = "nic-${var.vm_hostname}-${count.index}"
-  location                  = "${azurerm_resource_group.vm.location}"
-  resource_group_name       = "${azurerm_resource_group.vm.name}"
-  network_security_group_id = "${azurerm_network_security_group.vm.id}"
+  count                         = "${var.nb_instances}"
+  name                          = "nic-${var.vm_hostname}-${count.index}"
+  location                      = "${azurerm_resource_group.vm.location}"
+  resource_group_name           = "${azurerm_resource_group.vm.name}"
+  network_security_group_id     = "${azurerm_network_security_group.vm.id}"
+  enable_accelerated_networking = "${var.enable_accelerated_networking}"

   ip_configuration {
     name                          = "ipconfig${count.index}"
---
test/fixture/main.tf
@@ -7,17 +7,18 @@ resource "random_id" "ip_dns" {
 }

 module "ubuntuservers" {
-  source     type                  = "../../"
-  location                     = "${var.location}"
-  admin_username               = "${var.admin_username}"
-  admin_password               = "${var.admin_password}"
-  custom_data                  = "${var.custom_data}"
-  vm_os_simple                 = "${var.vm_os_simple_1}"
-  public_ip_dns                = ["ubuntusimplevmips-${random_id.ip_dns.hex}"]
-  vnet_subnet_id               = "${module.network.vnet_subnets[0]}"
-  ssh_key                      = "${var.ssh_key}"
-  resource_group_name          = "${var.resource_group_name}-${random_id.ip_dns.hex}"
-  public_ip_address_allocation = "static"
+  source                        = "../../"
+  location                      = "${var.location}"
+  admin_username                = "${var.admin_username}"
+  admin_password                = "${var.admin_password}"
+  vm_os_simple                  = "${var.vm_os_simple_1}"
+  public_ip_dns                 = ["ubuntusimplevmips-${random_id.ip_dns.hex}"]
+  vnet_subnet_id                = "${module.network.vnet_subnets[0]}"
+  ssh_key                       = "${var.ssh_key}"
+  resource_group_name           = "${var.resource_group_name}-${random_id.ip_dns.hex}"
+  public_ip_address_allocation  = "static"
+  enable_accelerated_networking = "true"
+  vm_size                       = "Standard_DS2_V2"
 }

 module "debianservers" {
---
variables.tf
@@ -145,3 +145,9 @@ variable "boot_diagnostics_sa_type" {
   description = "(Optional) Storage account type for boot diagnostics"
   default     = "Standard_LRS"
 }
+
+variable "enable_accelerated_networking" {
+  type        = "string"
+  description = "(Optional) Enable accelerated networking on Network interface"
+  default     = "false"
+}
---

---


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:
Add issue template to this repo.

---

Choice A:
.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,9 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+
+---
+
+<!-- Please search existing issues to avoid creating duplicates. -->
+
+<!-- Describe the feature you'd like. -->
---
bug_report.md
@@ -0,0 +1,20 @@
+---
+name: Bug report
+about: Create a report to help us improve
+---
+
+<!-- Please search existing issues to avoid creating duplicates. -->
+<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->
+
+<!-- Use Help > Report Issue to prefill these. -->
+
+- Terraform Version:
+- the Version:
+
+Bug description:
+
+Steps to reproduce:
+
+1.
+2.
+
---

---

Choice B:
.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,9 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+
+---
+
+<!-- Please search existing issues to avoid creating duplicates. -->
+
+<!-- Describe the feature you'd like. -->
---
bug_report.md
@@ -0,0 +1,20 @@
+---
+name: Bug report
+about: Create a please to help us improve
+---
+
+<!-- Please search existing issues to avoid creating duplicates. -->
+<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->
+
+<!-- Use Help > Report Issue to prefill these. -->
+
+- Terraform Version:
+- OS Version:
+
+Bug description:
+
+Steps to reproduce:
+
+1.
+2.
+
---

---

Choice C:
.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,9 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+
+---
+
+<!-- Please search existing issues to avoid creating duplicates. -->
+
+<!-- Describe the feature you'd like. -->
---
bug_report.md
@@ -0,0 +1,20 @@
+---
+name: Bug report
+about: Create a report to help us improve
+---
+
+<!-- Please search existing issues to avoid creating duplicates. -->
+<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->
+
+<!-- Use Help > Report Issue to prefill these. -->
+
+- Terraform Version:
+- OS Version:
+
+Bug description:
+
+Steps to reproduce:
+
+1.
+2.
+
---

---

Choice D:
.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,9 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+
+---
+
+<!-- Please search existing issues to avoid creating duplicates. -->
+
+<!-- Describe the feature +1,9 like. -->
---
bug_report.md
@@ -0,0 +1,20 @@
+---
+name: Bug report
+about: Create a report to help us improve
+---
+
+<!-- Please search existing issues to avoid creating duplicates. -->
+<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->
+
+<!-- Use Help > Report Issue to prefill these. -->
+
+- Terraform Version:
+- OS Version:
+
+Bug description:
+
+Steps to reproduce:
+
+1.
+2.
+
---

---


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:
Bumped version of provider azurerm to 1.1.0, so we can use azurerm_virtual_network_gateway and azurerm_virtual_network_gateway_connection. Closes #39.

---

Choice A:
main.tf
@@ -1,5 +1,5 @@
 provider "azurerm" {
-  version = 1.1.0"
 0.3"
+  version = ">= 1.1.0"
 }

 provider "random" {
---

---

Choice B:
main.tf
@@ -1,5 +1,5 @@
 provider  {
-  version = "~> 0.3"
+  version = ">= 1.1.0"
 }

 provider "random" {
---

---

Choice C:
main.tf
@@ -1,5 +1,5 @@
 provider 1.1.0"
 {
-  version = "~> 0.3"
+  version = ">= 1.1.0"
 }

 provider "random" {
---

---

Choice D:
main.tf
@@ -1,5 +1,5 @@
 provider "azurerm" {
-  version = "~> 0.3"
+  version = ">= 1.1.0"
 }

 provider "random" {
---

---


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:
Don't assume WindowsServer is the only offer for which Windows VMs are appropriate, and short-circuit this logic if the windows image parameter is explicitly specified.

---

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

 resource "azurerm_virtual_machine" "vm-linux" {
-  count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "WindowsServer") && var.is_windows_image != "true" && var.data_disk == "false" ? var.nb_instances : 0}"
+  count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows") && var.is_windows_image != "true" && var.data_disk == "false" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
   resource_group_name           = "${azurerm_resource_group.vm.name}"
@@ -84,7 +84,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
 }

 resource "azurerm_virtual_machine" "vm-linux-with-datadisk" {
-  count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "WindowsServer")  && var.is_windows_image != "true"  && var.data_disk == "true" ? var.nb_instances : 0}"
+  count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")  && var.is_windows_image != "true"  && var.data_disk == "true" ? var.nb_instances : 0}"
   name      :                    = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
   resource_group_name           = "${azurerm_resource_group.vm.name}"
@@ -140,7 +140,7 @@ resource "azurerm_virtual_machine" "vm-linux-with-datadisk" {
 }

 resource "azurerm_virtual_machine" "vm-windows" {
-  count                         = "${(((var.vm_os_id != "" && var.is_windows_image == "true") || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "WindowsServer")) && var.data_disk == "false") ? var.nb_instances : 0}"
+  count                         = "${((var.is_windows_image == "true" || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")) && var.data_disk == "false") ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
   resource_group_name           = "${azurerm_resource_group.vm.name}"
@@ -181,7 +181,7 @@ resource "azurerm_virtual_machine" "vm-windows" {
 }

 resource "azurerm_virtual_machine" "vm-windows-with-datadisk" {
-  count                         = "${((var.vm_os_id != "" && var.is_windows_image == "true") || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "WindowsServer")) && var.data_disk == "true" ? var.nb_instances : 0}"
+  count                         = "${(var.is_windows_image == "true" || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")) && var.data_disk == "true" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
   resource_group_name           = "${azurerm_resource_group.vm.name}"
---

---

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

 resource "azurerm_virtual_machine" "vm-linux" {
-  count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "WindowsServer") && var.is_windows_image != "true" && var.data_disk == "false" ? var.nb_instances : 0}"
+  count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows") && var.is_windows_image != "true" && var.data_disk == "false" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
   resource_group_name           = "${azurerm_resource_group.vm.name}"
@@ -84,7 +84,7 @@ resource "azurerm_virtual_machine"  {
 }

 resource "azurerm_virtual_machine" "vm-linux-with-datadisk" {
-  count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "WindowsServer")  && var.is_windows_image != "true"  && var.data_disk == "true" ? var.nb_instances : 0}"
+  count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")  && var.is_windows_image != "true"  && var.data_disk == "true" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
   resource_group_name           = "${azurerm_resource_group.vm.name}"
@@ -140,7 +140,7 @@ resource "azurerm_virtual_machine" "vm-linux-with-datadisk" {
 }

 resource "azurerm_virtual_machine" "vm-windows" {
-  count                         = "${(((var.vm_os_id != "" && var.is_windows_image == "true") || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "WindowsServer")) && var.data_disk == "false") ? var.nb_instances : 0}"
+  count                         = "${((var.is_windows_image == "true" || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")) && var.data_disk == "false") ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
   resource_group_name           = "${azurerm_resource_group.vm.name}"
@@ -181,7 +181,7 @@ resource "azurerm_virtual_machine" "vm-windows" {
 }

 resource "azurerm_virtual_machine" "vm-windows-with-datadisk" {
-  count                         = "${((var.vm_os_id != "" && var.is_windows_image == "true") || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "WindowsServer")) && var.data_disk == "true" ? var.nb_instances : 0}"
+  count                         = "${(var.is_windows_image == "true" || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")) && var.data_disk == "true" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
   resource_group_name           = "${azurerm_resource_group.vm.name}"
---

---

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

 resource "azurerm_virtual_machine" "vm-linux" {
-  count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "WindowsServer") && var.is_windows_image != "true" && var.data_disk == "false" ? var.nb_instances : 0}"
+  count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows") && var.is_windows_image != "true" && var.data_disk == "false" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
   resource_group_name           = "${azurerm_resource_group.vm.name}"
@@ -84,7 +84,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
 }

 resource "azurerm_virtual_machine" "vm-linux-with-datadisk" {
-  count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "WindowsServer")  && var.is_windows_image != "true"  && var.data_disk == "true" ? var.nb_instances : 0}"
+  count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")  && var.is_windows_image != "true"  && var.data_disk == "true" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
   resource_group_name           = "${azurerm_resource_group.vm.name}"
@@ -140,7 +140,7 @@ resource "azurerm_virtual_machine" "vm-linux-with-datadisk" {
 }

 resource "azurerm_virtual_machine" "vm-windows" {
-  count                         = "${(((var.vm_os_id != "" && var.is_windows_image == "true") || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "WindowsServer")) && var.data_disk == "false") ? var.nb_instances : 0}"
+  count                         = "${((var.is_windows_image == "true" || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")) && var.data_disk == "false") ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
   resource_group_name           = "${azurerm_resource_group.vm.name}"
@@ -181,7 +181,7 @@ resource "azurerm_virtual_machine" "vm-windows" {
 }

 resource "azurerm_virtual_machine" "vm-windows-with-datadisk" {
-  count                         = "${((var.vm_os_id != "" && var.is_windows_image == "true") || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "WindowsServer")) && var.data_disk == "true" ? var.nb_instances : 0}"
+  count                         = "${(var.is_windows_image == "true" || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")) && var.data_disk == "true" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
   resource_group_name           = "${azurerm_resource_group.vm.name}"
---

---

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

 resource "azurerm_virtual_machine" "vm-linux" {
-  count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "WindowsServer") && var.is_windows_image != "true" && var.data_disk == "false" ? var.nb_instances : 0}"
+  count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows") && var.is_windows_image != "true" && var.data_disk == "false" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
   resource_group_name           = "${azurerm_resource_group.vm.name}"
@@ -84,7 +84,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
 }

 resource "azurerm_virtual_machine" "vm-linux-with-datadisk" {
-  count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "WindowsServer")  && var.is_windows_image != "true"  && var.data_disk == "true" ? var.nb_instances : 0}"
+  count                         = "${!contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")  && var.is_windows_image != "true"  && var.data_disk == "true" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
   resource_group_name           = "${azurerm_resource_group.vm.name}"
@@ -140,7 +140,7 @@ resource "azurerm_virtual_machine" "vm-linux-with-datadisk" {
 }

 resource "azurerm_virtual_machine" "vm-windows" {
-  count                         = "${(((var.vm_os_id != "" && var.is_windows_image == "true") || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "WindowsServer")) && var.data_disk == "false") ? var.nb_instances : 0}"
+  count                         = "${((var.is_windows_image == "true" || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")) && var.data_disk == "false") ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
   resource_group_name           = "${azurerm_resource_group.vm.name}"
@@ -181,7 +181,7 @@ resource "azurerm_virtual_machine" "vm-windows" {
 }

 resource "azurerm_virtual_machine" "vm-windows-with-datadisk" {
-  count                         = "${((var.vm_os_id != "" && var.is_windows_image == "true") || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "WindowsServer")) && var.data_disk == "true" ? var.nb_instances : 0}"
+  count                         = "${(var.is_windows_image == "true" || contains(list("${var.vm_os_simple}","${var.vm_os_offer}"), "Windows")) && var.data_disk == "true" ? var.nb_instances : 0}"
   name                          = "${var.vm_hostname}${count.index}"
   location                      = "${var.location}"
   resource_group_name           = "${azurerm_resource_group.vm.name}"
---

---


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:
Resolve #71 by overriding the default false value for provision_vm_agent.

---

Choice A:
main.tf
@@ -172,7 +172,9 @@ resource "azurerm_virtual_machine" "vm-windows" {

   tags = "${var.tags}"

-  os_profile_windows_config {}
+  os_profile_windows_config {
+    provision_vm_agent = true
+  }

   boot_diagnostics {
     enabled      "${var.boot_diagnostics}"
@@ -221,7 +223,9 @@ resource "azurerm_virtual_machine" "vm-windows-with-datadisk" {

   tags = "${var.tags}"

-  os_profile_windows_config {}
+  os_profile_windows_config {
+    provision_vm_agent = true
+  }

   boot_diagnostics {
     enabled     = "${var.boot_diagnostics}"
---

---

Choice B:
main.tf
@@ -172,7 +172,9 @@ resource "azurerm_virtual_machine" "vm-windows" {

   tags = "${var.tags}"

-  os_profile_windows_config {}
+  os_profile_windows_config {
+    provision_vm_agent = true
+  }
    boot_diagnostics {
     enabled     = "${var.boot_diagnostics}"
@@ -221,7 +223,9 @@ resource "azurerm_virtual_machine" "vm-windows-with-datadisk" {

   tags = "${var.tags}"

-  os_profile_windows_config {}
+  os_profile_windows_config {
+    provision_vm_agent = true
+  }

   boot_diagnostics {
     enabled     = "${var.boot_diagnostics}"
---

---

Choice C:
main.tf
@@ -172,7 +172,9 @@ resource "azurerm_virtual_machine" "vm-windows" {

   tags = "${var.tags}"

-  os_profile_windows_config {}
+  os_profile_windows_config {
+    provision_vm_agent = true
+  }

   boot_diagnostics {
     enabled     = "${var.boot_diagnostics}"
@@ -221,7 +223,9 @@ resource "azurerm_virtual_machine" "vm-windows-with-datadisk" {

   tags = "${var.tags}"

-  os_profile_windows_config {}
+  os_profile_windows_config {
+    provision_vm_agent = true
+  }

   boot_diagnostics {
     enabled     = "${var.boot_diagnostics}"
---

---

Choice D:
main.tf
@@ -172,7 resource @@ resource "azurerm_virtual_machine" "vm-windows" {

   tags = "${var.tags}"

-  os_profile_windows_config {}
+  os_profile_windows_config {
+    provision_vm_agent = true
+  }

   boot_diagnostics {
     enabled     = "${var.boot_diagnostics}"
@@ -221,7 +223,9 @@ resource "azurerm_virtual_machine" "vm-windows-with-datadisk" {

   tags = "${var.tags}"

-  os_profile_windows_config {}
+  os_profile_windows_config {
+    provision_vm_agent = true
+  }

   boot_diagnostics {
     enabled     = "${var.boot_diagnostics}"
---

---