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

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

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

Fixes https://github.com/azure/terraform-azurerm-compute/issues/164

Changes proposed in the pull request:

---

Choice A:
README.md
@@ -182,24 +182,25 @@ data "azurerm_key_vault_certificate" "example" {
 }

 module "linuxservers" {
-  source                        = "Azure/compute/azurerm"
-  resource_group_name           = azurerm_resource_group.example.name
-  vm_hostname                   = "mylinuxvm"
-  nb_public_ip                  = 0
-  remote_port                   = "22"
-  nb_instances                  = 2
-  vm_os_publisher               = "Canonical"
-  vm_os_offer                   = "UbuntuServer"
-  vm_os_sku                     = "18.04-LTS"
-  vnet_subnet_id                = module.network.vnet_subnets[0]
-  boot_diagnostics              = true
-  delete_os_disk_on_termination = true
-  nb_data_disk                  = 2
-  data_disk_size_gb             = 64
-  data_sa_type                  = "Premium_LRS"
-  enable_ssh_key                = true
-  ssh_key_values                = ["ssh-rsa AAAAB3NzaC1yc2EAAAAD..."]
-  vm_size                       = "Standard_D4s_v3"
+  source                           = "Azure/compute/azurerm"
+  resource_group_name              = azurerm_resource_group.example.name
+  vm_hostname                      = "mylinuxvm"
+  nb_public_ip                     = 0
+  remote_port                      = "22"
+  nb_instances                     = 2
+  vm_os_publisher                  = "Canonical"
+  vm_os_offer                      = "UbuntuServer"
+  vm_os_sku                        = "18.04-LTS"
+  vnet_subnet_id                   = module.network.vnet_subnets[0]
+  boot_diagnostics                 = true
+  delete_os_disk_on_termination    = true
+  nb_data_disk                     = 2
+  data_disk_size_gb                = 64
+  data_sa_type                     = "Premium_LRS"
+  enable_ssh_key                   = true
+  ssh_key_values                   = ["ssh-rsa AAAAB3NzaC1yc2EAAAAD..."]
+  vm_size                          = "Standard_D4s_v3"
+  delete_data_disks_on_termination = true

   tags = {
     environment = "dev"
---
main.tf
@@ -30,14 +30,15 @@ resource "azurerm_storage_account" "vm-sa" {
 }

 resource "azurerm_virtual_machine" "vm-linux" {
-  count                         = ! contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && ! var.is_windows_image ? var.nb_instances : 0
-  name                          = "${var.vm_hostname}-vmLinux-${count.index}"
-  resource_group_name           = data.azurerm_resource_group.vm.name
-  location                      = coalesce(var.location, data.azurerm_resource_group.vm.location)
-  availability_set_id           = azurerm_availability_set.vm.id
-  vm_size                       = var.vm_size
-  network_interface_ids         = [element(azurerm_network_interface.vm.*.id, count.index)]
-  delete_os_disk_on_termination = var.delete_os_disk_on_termination
+  count                            = ! contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && ! var.is_windows_image ? var.nb_instances : 0
+  name                             = "${var.vm_hostname}-vmLinux-${count.index}"
+  resource_group_name              = data.azurerm_resource_group.vm.name
+  location                         = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  availability_set_id              = azurerm_availability_set.vm.id
+  vm_size                          = var.vm_size
+  network_interface_ids            = [element(azurerm_network_interface.vm.*.id, count.index)]
+  delete_os_disk_on_termination    = var.delete_os_disk_on_termination
+  delete_data_disks_on_termination = var.delete_data_disks_on_termination

   dynamic identity {
     for_each = length(var.identity_ids) == 0 && var.identity_type == "SystemAssigned" ? [var.identity_type] : []
---
test/fixture/main.tf
@@ -104,16 +104,17 @@ module "debianservers" {
 }

 module "debianservers2" {
-  source              = "../../"
-  vm_hostname         = "${random_id.ip_dns.hex}-d2"
-  resource_group_name = azurerm_resource_group.test.name
-  location            = var.location_alt
-  admin_username      = var.admin_username
-  vm_os_simple        = var.vm_os_simple_2
-  vnet_subnet_id      = azurerm_subnet.subnet2.id
-  enable_ssh_key      = true
-  ssh_key             = ""
-  ssh_key_values      = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC8GIRF1Snlg9NKCmM74RHXqRGMXyui088+ntQqkQkFIL/BrlgP3CzOgHQmJ+3f0Up/+9UY9vX7AmT7WxVTyqBHT/Aes3VmU3wLO5/MMV/HRrT4z2QV/80futhxjk2unNdWGvbFcR6Y3I44EJFmr8GMbyXRtr0ibuv8BlTYx/K6AXSJ3V+kBqXMOF1QRvVoX9fJKPKjMsebe0cB1IYlm9KLqtciMy+aFOEsSNfrw5cNVsQfK3BgOUKAHsLfBiR7imA2ca+hh005GEtcVJvpvFzcM+bZggUpdqQwIzk1Kv/tROiJiGS0NnyzoxIZYeM3z/mQ5qnglp+174XGCG66EAnVdf5kbaI0Iu7FpAmVhJ92N+MNKoP6vT8cMkYYZf3RaiMMnzjswK/VLbb5ks6Qe9qEPXW1IBtkaaF7+0PCWbPr86I0G2bOa2tFyOHm046Z9sRlkaOO95hmer6Y6MUbMpfeprmjR87u6MVOPglnARfV3UI9i6wOUhVVIi6Wb424HWU="]
+  source                           = "../../"
+  vm_hostname                      = "${random_id.ip_dns.hex}-d2"
+  resource_group_name              = azurerm_resource_group.test.name
+  location                         = var.location_alt
+  admin_username                   = var.admin_username
+  vm_os_simple                     = var.vm_os_simple_2
+  vnet_subnet_id                   = azurerm_subnet.subnet2.id
+  enable_ssh_key                   = true
+  delete_data_disks_on_termination = true
+  ssh_key                          = ""
+  ssh_key_values                   = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC8GIRF1Snlg9NKCmM74RHXqRGMXyui088+ntQqkQkFIL/BrlgP3CzOgHQmJ+3f0Up/+9UY9vX7AmT7WxVTyqBHT/Aes3VmU3wLO5/MMV/HRrT4z2QV/80futhxjk2unNdWGvbFcR6Y3I44EJFmr8GMbyXRtr0ibuv8BlTYx/K6AXSJ3V+kBqXMOF1QRvVoX9fJKPKjMsebe0cB1IYlm9KLqtciMy+aFOEsSNfrw5cNVsQfK3BgOUKAHsLfBiR7imA2ca+hh005GEtcVJvpvFzcM+bZggUpdqQwIzk1Kv/tROiJiGS0NnyzoxIZYeM3z/mQ5qnglp+174XGCG66EAnVdf5kbaI0Iu7FpAmVhJ92N+MNKoP6vT8cMkYYZf3RaiMMnzjswK/VLbb5ks6Qe9qEPXW1IBtkaaF7+0PCWbPr86I0G2bOa2tFyOHm046Z9sRlkaOO95hmer6Y6MUbMpfeprmjR87u6MVOPglnARfV3UI9i6wOUhVVIi6Wb424HWU="]

   depends_on = [azurerm_resource_group.test]
 }
---
variables.tf
@@ -160,6 +160,12 @@ variable "delete_os_disk_on_termination" {
   default     = false
 }

+variable "delete_data_disks_on_termination" {
+  type        = bool
+  description = "Delete data disks when machine is terminated."
+  default     = false
+}
+
 variable "data_sa_type" {
   description = "Data Disk Storage Account type."
   type        = string
---

---

Choice B:
README.md
@@ -182,24 +182,25 @@ data "azurerm_key_vault_certificate" "example" {
 }

 module "linuxservers" {
-  source                        = "Azure/compute/azurerm"
-  resource_group_name           = azurerm_resource_group.example.name
-  vm_hostname                   = "mylinuxvm"
-  nb_public_ip                  = 0
-  remote_port                   = "22"
-  nb_instances                  = 2
-  vm_os_publisher               = "Canonical"
-  vm_os_offer                   = "UbuntuServer"
-  vm_os_sku                     = "18.04-LTS"
-  vnet_subnet_id                = module.network.vnet_subnets[0]
-  boot_diagnostics              = true
-  delete_os_disk_on_termination = true
-  nb_data_disk                  = 2
-  data_disk_size_gb             = 64
-  data_sa_type                  = "Premium_LRS"
-  enable_ssh_key                = true
-  ssh_key_values                = ["ssh-rsa AAAAB3NzaC1yc2EAAAAD..."]
-  vm_size                       = "Standard_D4s_v3"
+  source                           = "Azure/compute/azurerm"
+  resource_group_name              = azurerm_resource_group.example.name
+  vm_hostname                      = "mylinuxvm"
+  nb_public_ip                     = 0
+  remote_port                      = "22"
+  nb_instances                     = 2
+  vm_os_publisher                  = "Canonical"
+  vm_os_offer                      = "UbuntuServer"
+  vm_os_sku                        = "18.04-LTS"
+  vnet_subnet_id                   = module.network.vnet_subnets[0]
+  boot_diagnostics                 = true
+  delete_os_disk_on_termination    = true
+  nb_data_disk                     = 2
+  data_disk_size_gb                = 64
+  data_sa_type                     = "Premium_LRS"
+  enable_ssh_key                   = true
+  ssh_key_values                   = ["ssh-rsa AAAAB3NzaC1yc2EAAAAD..."]
+  vm_size                          = "Standard_D4s_v3"
+  delete_data_disks_on_termination = true

   tags = {
     environment = "dev"
---
main.tf
@@ -30,14 +30,15 @@ resource "azurerm_storage_account" "vm-sa" {
 }

 resource "azurerm_virtual_machine" "vm-linux" {
-  count                         = ! contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && ! var.is_windows_image ? var.nb_instances : 0
-  name                          = "${var.vm_hostname}-vmLinux-${count.index}"
-  resource_group_name           = data.azurerm_resource_group.vm.name
-  location                      = coalesce(var.location, data.azurerm_resource_group.vm.location)
-  availability_set_id           = azurerm_availability_set.vm.id
-  vm_size                       = var.vm_size
-  network_interface_ids         = [element(azurerm_network_interface.vm.*.id, count.index)]
-  delete_os_disk_on_termination = var.delete_os_disk_on_termination
+  count                            = ! contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && ! var.is_windows_image ? var.nb_instances : 0
+  name                             = "${var.vm_hostname}-vmLinux-${count.index}"
+  resource_group_name              = data.azurerm_resource_group.vm.name
+  location                         = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  availability_set_id              = azurerm_availability_set.vm.id
+  vm_size                          = var.vm_size
+  network_interface_ids            = [element(azurerm_network_interface.vm.*.id, count.index)]
+  delete_os_disk_on_termination    = var.delete_os_disk_on_termination
+  delete_data_disks_on_termination = var.delete_data_disks_on_termination

   dynamic identity {
     for_each = length(var.identity_ids) == 0 && var.identity_type == "SystemAssigned" ? [var.identity_type] : []
---
test/fixture/main.tf
@@ -104,16 +104,17 @@ module "debianservers" {
 }

 module "debianservers2" {
-  source              = "../../"
-  vm_hostname         = "${random_id.ip_dns.hex}-d2"
-  resource_group_name = azurerm_resource_group.test.name
-  location            = var.location_alt
-  admin_username      = var.admin_username
-  vm_os_simple        = var.vm_os_simple_2
-  vnet_subnet_id      = azurerm_subnet.subnet2.id
-  enable_ssh_key      = true
-  ssh_key             = ""
-  ssh_key_values      = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC8GIRF1Snlg9NKCmM74RHXqRGMXyui088+ntQqkQkFIL/BrlgP3CzOgHQmJ+3f0Up/+9UY9vX7AmT7WxVTyqBHT/Aes3VmU3wLO5/MMV/HRrT4z2QV/80futhxjk2unNdWGvbFcR6Y3I44EJFmr8GMbyXRtr0ibuv8BlTYx/K6AXSJ3V+kBqXMOF1QRvVoX9fJKPKjMsebe0cB1IYlm9KLqtciMy+aFOEsSNfrw5cNVsQfK3BgOUKAHsLfBiR7imA2ca+hh005GEtcVJvpvFzcM+bZggUpdqQwIzk1Kv/tROiJiGS0NnyzoxIZYeM3z/mQ5qnglp+174XGCG66EAnVdf5kbaI0Iu7FpAmVhJ92N+MNKoP6vT8cMkYYZf3RaiMMnzjswK/VLbb5ks6Qe9qEPXW1IBtkaaF7+0PCWbPr86I0G2bOa2tFyOHm046Z9sRlkaOO95hmer6Y6MUbMpfeprmjR87u6MVOPglnARfV3UI9i6wOUhVVIi6Wb424HWU="]
+  source                           = "../../"
+  vm_hostname                      = "${random_id.ip_dns.hex}-d2"
+  resource_group_name              = azurerm_resource_group.test.name
+  location                         = var.location_alt
+  admin_username                   = var.admin_username
+  vm_os_simple                     = var.vm_os_simple_2
+  vnet_subnet_id                   = azurerm_subnet.subnet2.id
+  enable_ssh_key                   = true
+  delete_data_disks_on_termination = true
+  ssh_key                          = ""
+  ssh_key_values                   = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC8GIRF1Snlg9NKCmM74RHXqRGMXyui088+ntQqkQkFIL/BrlgP3CzOgHQmJ+3f0Up/+9UY9vX7AmT7WxVTyqBHT/Aes3VmU3wLO5/MMV/HRrT4z2QV/80futhxjk2unNdWGvbFcR6Y3I44EJFmr8GMbyXRtr0ibuv8BlTYx/K6AXSJ3V+kBqXMOF1QRvVoX9fJKPKjMsebe0cB1IYlm9KLqtciMy+aFOEsSNfrw5cNVsQfK3BgOUKAHsLfBiR7imA2ca+hh005GEtcVJvpvFzcM+bZggUpdqQwIzk1Kv/tROiJiGS0NnyzoxIZYeM3z/mQ5qnglp+174XGCG66EAnVdf5kbaI0Iu7FpAmVhJ92N+MNKoP6vT8cMkYYZf3RaiMMnzjswK/VLbb5ks6Qe9qEPXW1IBtkaaF7+0PCWbPr86I0G2bOa2tFyOHm046Z9sRlkaOO95hmer6Y6MUbMpfeprmjR87u6MVOPglnARfV3UI9i6wOUhVVIi6Wb424HWU="]

   depends_on = [azurerm_resource_group.test]
 }
---
variables.tf
@@ -160,6 +160,12 @@ variable "delete_os_disk_on_termination" {
   default     = false
 }

+variable "delete_data_disks_on_termination" {
+  type        = bool
+  description = "Delete data disks when machine is terminated."
+  default     = false
+}
+
 variable "data_sa_type" {
   description = "Data Disk Storage Account type."
   type        = string
---

---

Choice C:
README.md
@@ -182,24 +182,25 @@ data "azurerm_key_vault_certificate" "example" {
 }

 module "linuxservers" {
-  source                        = "Azure/compute/azurerm"
-  resource_group_name           = azurerm_resource_group.example.name
-  vm_hostname                   = "mylinuxvm"
-  nb_public_ip                  = 0
-  remote_port                   = "22"
-  nb_instances                  = 2
-  vm_os_publisher               = "Canonical"
-  vm_os_offer                   = "UbuntuServer"
-  vm_os_sku                     = "18.04-LTS"
-  vnet_subnet_id                = module.network.vnet_subnets[0]
-  boot_diagnostics              = true
-  delete_os_disk_on_termination = true
-  nb_data_disk                  = 2
-  data_disk_size_gb             = 64
-  data_sa_type                  = "Premium_LRS"
-  enable_ssh_key                = true
-  ssh_key_values                = ["ssh-rsa AAAAB3NzaC1yc2EAAAAD..."]
-  vm_size                       = "Standard_D4s_v3"
+  source                           = "Azure/compute/azurerm"
+  resource_group_name              = azurerm_resource_group.example.name
+  vm_hostname                      = "mylinuxvm"
+  nb_public_ip                     = 0
+  remote_port                      = "22"
+  nb_instances                     = 2
+  vm_os_publisher                  = "Canonical"
+  vm_os_offer                      = "UbuntuServer"
+  vm_os_sku                        = "18.04-LTS"
+  vnet_subnet_id                   = module.network.vnet_subnets[0]
+  boot_diagnostics                 = true
+  delete_os_disk_on_termination    = true
+  nb_data_disk                     = 2
+  data_disk_size_gb                = 64
+  data_sa_type                     = "Premium_LRS"
+  enable_ssh_key                   = true
+  ssh_key_values                   = ["ssh-rsa AAAAB3NzaC1yc2EAAAAD..."]
+  vm_size                          = "Standard_D4s_v3"
+  delete_data_disks_on_termination = true

   tags = {
     environment = "dev"
---
main.tf
@@ -30,14 +30,15 @@ resource "azurerm_storage_account" "vm-sa" {
 }

 resource "azurerm_virtual_machine" "vm-linux" {
-  count                         = ! contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && ! var.is_windows_image ? var.nb_instances : 0
-  name                          = "${var.vm_hostname}-vmLinux-${count.index}"
-  resource_group_name           = data.azurerm_resource_group.vm.name
-  location                      = coalesce(var.location, data.azurerm_resource_group.vm.location)
-  availability_set_id           = azurerm_availability_set.vm.id
-  vm_size                       = var.vm_size
-  network_interface_ids         = [element(azurerm_network_interface.vm.*.id, count.index)]
-  delete_os_disk_on_termination = var.delete_os_disk_on_termination
+  count                            = ! contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && ! var.is_windows_image ? var.nb_instances : 0
+  name                             = "${var.vm_hostname}-vmLinux-${count.index}"
+  resource_group_name              = data.azurerm_resource_group.vm.name
+  location                         = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  availability_set_id              = azurerm_availability_set.vm.id
+  vm_size                          = var.vm_size
+  network_interface_ids            = [element(azurerm_network_interface.vm.*.id, count.index)]
+  delete_os_disk_on_termination    = var.delete_os_disk_on_termination
+  delete_data_disks_on_termination = var.delete_data_disks_on_termination

   dynamic identity {
     for_each = length(var.identity_ids) == 0 && var.identity_type == "SystemAssigned" ? [var.identity_type] : []
---
test/fixture/main.tf
@@ -104,16 +104,17 @@ module "debianservers" {
 }

 module "debianservers2" {
-  source              = "../../"
-  vm_hostname         = "${random_id.ip_dns.hex}-d2"
-  resource_group_name = azurerm_resource_group.test.name
-  location            = var.location_alt
-  admin_username      = var.admin_username
-  vm_os_simple        = var.vm_os_simple_2
-  vnet_subnet_id      = azurerm_subnet.subnet2.id
-  enable_ssh_key      = true
-  ssh_key             = ""
-  ssh_key_values      = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC8GIRF1Snlg9NKCmM74RHXqRGMXyui088+ntQqkQkFIL/BrlgP3CzOgHQmJ+3f0Up/+9UY9vX7AmT7WxVTyqBHT/Aes3VmU3wLO5/MMV/HRrT4z2QV/80futhxjk2unNdWGvbFcR6Y3I44EJFmr8GMbyXRtr0ibuv8BlTYx/K6AXSJ3V+kBqXMOF1QRvVoX9fJKPKjMsebe0cB1IYlm9KLqtciMy+aFOEsSNfrw5cNVsQfK3BgOUKAHsLfBiR7imA2ca+hh005GEtcVJvpvFzcM+bZggUpdqQwIzk1Kv/tROiJiGS0NnyzoxIZYeM3z/mQ5qnglp+174XGCG66EAnVdf5kbaI0Iu7FpAmVhJ92N+MNKoP6vT8cMkYYZf3RaiMMnzjswK/VLbb5ks6Qe9qEPXW1IBtkaaF7+0PCWbPr86I0G2bOa2tFyOHm046Z9sRlkaOO95hmer6Y6MUbMpfeprmjR87u6MVOPglnARfV3UI9i6wOUhVVIi6Wb424HWU="]
+  source                           = "../../"
+  vm_hostname                      = "${random_id.ip_dns.hex}-d2"
+  resource_group_name              = azurerm_resource_group.test.name
+  location                         = var.location_alt
+  admin_username                   = var.admin_username
+  vm_os_simple                     = var.vm_os_simple_2
+  vnet_subnet_id                   = azurerm_subnet.subnet2.id
+  enable_ssh_key                   = true
+  delete_data_disks_on_termination = true
+  ssh_key                          = ""
+  ssh_key_values                   = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC8GIRF1Snlg9NKCmM74RHXqRGMXyui088+ntQqkQkFIL/BrlgP3CzOgHQmJ+3f0Up/+9UY9vX7AmT7WxVTyqBHT/Aes3VmU3wLO5/MMV/HRrT4z2QV/80futhxjk2unNdWGvbFcR6Y3I44EJFmr8GMbyXRtr0ibuv8BlTYx/K6AXSJ3V+kBqXMOF1QRvVoX9fJKPKjMsebe0cB1IYlm9KLqtciMy+aFOEsSNfrw5cNVsQfK3BgOUKAHsLfBiR7imA2ca+hh005GEtcVJvpvFzcM+bZggUpdqQwIzk1Kv/tROiJiGS0NnyzoxIZYeM3z/mQ5qnglp+174XGCG66EAnVdf5kbaI0Iu7FpAmVhJ92N+MNKoP6vT8cMkYYZf3RaiMMnzjswK/VLbb5ks6Qe9qEPXW1IBtkaaF7+0PCWbPr86I0G2bOa2tFyOHm046Z9sRlkaOO95hmer6Y6MUbMpfeprmjR87u6MVOPglnARfV3UI9i6wOUhVVIi6Wb424HWU="]

   depends_on = [azurerm_resource_group.test]
 }
---
variables.tf
@@ -160,6 +160,12 @@ variable "delete_os_disk_on_termination" {
   default     = false
 }

+variable "delete_data_disks_on_termination" {
+  type        = bool
+  description = "Delete data disks when machine is terminated."
+  default     = false
+}
+
 variable "data_sa_type" {
   description = "Data Disk Storage Account type."
   type        = string
---

---

Choice D:
README.md
@@ -182,24 +182,25 @@ data "azurerm_key_vault_certificate" "example" {
 }

 module "linuxservers" {
-  source                        = "Azure/compute/azurerm"
-  resource_group_name           = azurerm_resource_group.example.name
-  vm_hostname                   = "mylinuxvm"
-  nb_public_ip                  = 0
-  remote_port                   = "22"
-  nb_instances                  = 2
-  vm_os_publisher               = "Canonical"
-  vm_os_offer                   = "UbuntuServer"
-  vm_os_sku                     = "18.04-LTS"
-  vnet_subnet_id                = module.network.vnet_subnets[0]
-  boot_diagnostics              = true
-  delete_os_disk_on_termination = true
-  nb_data_disk                  = 2
-  data_disk_size_gb             = 64
-  data_sa_type                  = "Premium_LRS"
-  enable_ssh_key                = true
-  ssh_key_values                = ["ssh-rsa AAAAB3NzaC1yc2EAAAAD..."]
-  vm_size                       = "Standard_D4s_v3"
+  source                           = "Azure/compute/azurerm"
+  resource_group_name              = azurerm_resource_group.example.name
+  vm_hostname                      = "mylinuxvm"
+  nb_public_ip                     = 0
+  remote_port                      = "22"
+  nb_instances                     = 2
+  vm_os_publisher                  = "Canonical"
+  vm_os_offer                      = "UbuntuServer"
+  vm_os_sku                        = "18.04-LTS"
+  vnet_subnet_id                   = module.network.vnet_subnets[0]
+  boot_diagnostics                  true
+  delete_os_disk_on_termination    = true
+  nb_data_disk                     = 2
+  data_disk_size_gb                = 64
+  data_sa_type                     = "Premium_LRS"
+  enable_ssh_key                   = true
+  ssh_key_values                   = ["ssh-rsa AAAAB3NzaC1yc2EAAAAD..."]
+  vm_size                          = "Standard_D4s_v3"
+  delete_data_disks_on_termination = true

   tags = {
     environment = "dev"
---
main.tf
@@ -30,14 +30,15 @@ resource "azurerm_storage_account" "vm-sa" {
 }

 resource "azurerm_virtual_machine" "vm-linux" {
-  count                         = ! contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && ! var.is_windows_image ? var.nb_instances : 0
-  name                          = "${var.vm_hostname}-vmLinux-${count.index}"
-  resource_group_name           = data.azurerm_resource_group.vm.name
-  location                      = coalesce(var.location, data.azurerm_resource_group.vm.location)
-  availability_set_id           = azurerm_availability_set.vm.id
-  vm_size                       = var.vm_size
-  network_interface_ids         = [element(azurerm_network_interface.vm.*.id, count.index)]
-  delete_os_disk_on_termination = var.delete_os_disk_on_termination
+  count                            = ! contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && ! var.is_windows_image ? var.nb_instances : 0
+  name                             = "${var.vm_hostname}-vmLinux-${count.index}"
+  resource_group_name              = data.azurerm_resource_group.vm.name
+  location                         = coalesce(var.location, data.azurerm_resource_group.vm.location)
+  availability_set_id              = azurerm_availability_set.vm.id
+  vm_size                          = var.vm_size
+  network_interface_ids            = [element(azurerm_network_interface.vm.*.id, count.index)]
+  delete_os_disk_on_termination    = var.delete_os_disk_on_termination
+  delete_data_disks_on_termination = var.delete_data_disks_on_termination

   dynamic identity {
     for_each = length(var.identity_ids) == 0 && var.identity_type == "SystemAssigned" ? [var.identity_type] : []
---
test/fixture/main.tf
@@ -104,16 +104,17 @@ module "debianservers" {
 }

 module "debianservers2" {
-  source              = "../../"
-  vm_hostname         = "${random_id.ip_dns.hex}-d2"
-  resource_group_name = azurerm_resource_group.test.name
-  location            = var.location_alt
-  admin_username      = var.admin_username
-  vm_os_simple        = var.vm_os_simple_2
-  vnet_subnet_id      = azurerm_subnet.subnet2.id
-  enable_ssh_key      = true
-  ssh_key             = ""
-  ssh_key_values      = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC8GIRF1Snlg9NKCmM74RHXqRGMXyui088+ntQqkQkFIL/BrlgP3CzOgHQmJ+3f0Up/+9UY9vX7AmT7WxVTyqBHT/Aes3VmU3wLO5/MMV/HRrT4z2QV/80futhxjk2unNdWGvbFcR6Y3I44EJFmr8GMbyXRtr0ibuv8BlTYx/K6AXSJ3V+kBqXMOF1QRvVoX9fJKPKjMsebe0cB1IYlm9KLqtciMy+aFOEsSNfrw5cNVsQfK3BgOUKAHsLfBiR7imA2ca+hh005GEtcVJvpvFzcM+bZggUpdqQwIzk1Kv/tROiJiGS0NnyzoxIZYeM3z/mQ5qnglp+174XGCG66EAnVdf5kbaI0Iu7FpAmVhJ92N+MNKoP6vT8cMkYYZf3RaiMMnzjswK/VLbb5ks6Qe9qEPXW1IBtkaaF7+0PCWbPr86I0G2bOa2tFyOHm046Z9sRlkaOO95hmer6Y6MUbMpfeprmjR87u6MVOPglnARfV3UI9i6wOUhVVIi6Wb424HWU="]
+  source                           = "../../"
+  vm_hostname                      = "${random_id.ip_dns.hex}-d2"
+  resource_group_name              = azurerm_resource_group.test.name
+  location                         = var.location_alt
+  admin_username                   = var.admin_username
+  vm_os_simple                     = var.vm_os_simple_2
+  vnet_subnet_id                   = azurerm_subnet.subnet2.id
+  enable_ssh_key                   = true
+  delete_data_disks_on_termination = true
+  ssh_key                          = ""
+  ssh_key_values                   = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC8GIRF1Snlg9NKCmM74RHXqRGMXyui088+ntQqkQkFIL/BrlgP3CzOgHQmJ+3f0Up/+9UY9vX7AmT7WxVTyqBHT/Aes3VmU3wLO5/MMV/HRrT4z2QV/80futhxjk2unNdWGvbFcR6Y3I44EJFmr8GMbyXRtr0ibuv8BlTYx/K6AXSJ3V+kBqXMOF1QRvVoX9fJKPKjMsebe0cB1IYlm9KLqtciMy+aFOEsSNfrw5cNVsQfK3BgOUKAHsLfBiR7imA2ca+hh005GEtcVJvpvFzcM+bZggUpdqQwIzk1Kv/tROiJiGS0NnyzoxIZYeM3z/mQ5qnglp+174XGCG66EAnVdf5kbaI0Iu7FpAmVhJ92N+MNKoP6vT8cMkYYZf3RaiMMnzjswK/VLbb5ks6Qe9qEPXW1IBtkaaF7+0PCWbPr86I0G2bOa2tFyOHm046Z9sRlkaOO95hmer6Y6MUbMpfeprmjR87u6MVOPglnARfV3UI9i6wOUhVVIi6Wb424HWU="]

   depends_on = [azurerm_resource_group.test]
 }
---
variables.tf
@@ -160,6 +160,12 @@ variable "delete_os_disk_on_termination" {
   default     = false
 }

+variable "delete_data_disks_on_termination" {
+  type        = bool
+  description = "Delete data disks when machine is terminated."
+  default     = false
+}
+
 variable "data_sa_type" {
   description = "Data Disk Storage Account type."
   type        = string
---

---


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

Task Description:
In terraform >= 0.15.0, the deprecated list method is removed. This causes the module to stop working on newer versions. List method has been changed to tolist method.

For more information see:
- https://www.terraform.io/docs/language/functions/tolist.html
- https://github.com/hashicorp/terraform/blob/v0.15/CHANGELOG.md#0150-april-14-2021

Error:

```bash
│ Error: Error in function call
│
│   on .terraform/modules/vm_set/main.tf line 33, in resource "azurerm_virtual_machine" "vm-linux":
│   33:   count                         = ! contains(list(var.vm_os_simple, var.vm_os_offer), "WindowsServer") && ! var.is_windows_image ? var.nb_instances : 0
│     ├────────────────
│     │ var.vm_os_offer is a string, known only after apply
│     │ var.vm_os_simple is a string, known only after apply
│
│ Call to function "list" failed: the "list" function was deprecated in
│ Terraform v0.12 and is no longer available; use tolist([ ... ]) syntax to
│ write a literal list.
```

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

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

Changes proposed in the pull request:

- Delete deprecated `list` method and replace it with `tolist`.

---

Choice A:
Dockerfile
@@ -1,5 +1,5 @@
 # Pull the base image with given version.
-ARG BUILD_TERRAFORM_VERSION="0.13.5"
+ARG BUILD_TERRAFORM_VERSION="0.14.4"
 FROM mcr.microsoft.com/terraform-test:${BUILD_TERRAFORM_VERSION}

 ARG MODULE_NAME="terraform-azurerm-compute"
---
main.tf
@@ -30,7 +30,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 ? var.nb_instances : 0
+  count                         = ! contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && ! var.is_windows_image ? var.nb_instances : 0
   name                          = "${var.vm_hostname}-vmLinux-${count.index}"
   resource_group_name           = data.azurerm_resource_group.vm.name
   location                      = coalesce(var.location, data.azurerm_resource_group.vm.location)
@@ -139,7 +139,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
 }

 resource "azurerm_virtual_machine" "vm-windows" {
-  count                         = (var.is_windows_image || contains(list(var.vm_os_simple, var.vm_os_offer), "WindowsServer")) ? var.nb_instances : 0
+  count                         = (var.is_windows_image || contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer")) ? var.nb_instances : 0
   name                          = "${var.vm_hostname}-vmWindows-${count.index}"
   resource_group_name           = data.azurerm_resource_group.vm.name
   location                      = coalesce(var.location, data.azurerm_resource_group.vm.location)
@@ -295,7 +295,7 @@ resource "azurerm_network_interface" "vm" {
     name                          = "${var.vm_hostname}-ip-${count.index}"
     subnet_id                     = var.vnet_subnet_id
     private_ip_address_allocation = "Dynamic"
-    public_ip_address_id          = length(azurerm_public_ip.vm.*.id) > 0 ? element(concat(azurerm_public_ip.vm.*.id, list("")), count.index) : ""
+    public_ip_address_id          = length(azurerm_public_ip.vm.*.id) > 0 ? element(concat(azurerm_public_ip.vm.*.id, tolist([""])), count.index) : ""
   }

   tags = var.tags
---

---

Choice B:
Dockerfile
@@ -1,5 +1,5 @@
 # Pull the base image with given version.
-ARG BUILD_TERRAFORM_VERSION="0.13.5"
+ARG BUILD_TERRAFORM_VERSION="0.14.4"
 FROM mcr.microsoft.com/terraform-test:${BUILD_TERRAFORM_VERSION}

 ARG MODULE_NAME="terraform-azurerm-compute"
---
main.tf
@@ -30,7 +30,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 ? var.nb_instances : 0
+  count                         = ! contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && ! var.is_windows_image ? var.nb_instances : 0
   name                          = "${var.vm_hostname}-vmLinux-${count.index}"
   resource_group_name           = data.azurerm_resource_group.vm.name
   location                      = coalesce(var.location, data.azurerm_resource_group.vm.location)
@@ -139,7 +139,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
 }

 resource "azurerm_virtual_machine" "vm-windows" {
-  count                         = (var.is_windows_image || contains(list(var.vm_os_simple, var.vm_os_offer), "WindowsServer")) ? var.nb_instances : 0
+  count                         = (var.is_windows_image || contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer")) ? var.nb_instances : 0
   name                          = "${var.vm_hostname}-vmWindows-${count.index}"
   resource_group_name           = data.azurerm_resource_group.vm.name
   location                      = coalesce(var.location, data.azurerm_resource_group.vm.location)
@@ -295,7 +295,7 @@ resource "azurerm_network_interface" "vm" {
     name                          = "${var.vm_hostname}-ip-${count.index}"
     subnet_id                     = var.vnet_subnet_id
     private_ip_address_allocation = "Dynamic"
-    public_ip_address_id          = length(azurerm_public_ip.vm.*.id) > 0 ? element(concat(azurerm_public_ip.vm.*.id, list("")), count.index) : ""
+    public_ip_address_id          = length(azurerm_public_ip.vm.*.id) > 0 ? element(concat(azurerm_public_ip.vm.*.id, tolist([""])), count.index) : ""
   }

   tags = var.tags
---

---

Choice C:
Dockerfile
@@ -1,5  @@
 # Pull the base image with given version.
-ARG BUILD_TERRAFORM_VERSION="0.13.5"
+ARG BUILD_TERRAFORM_VERSION="0.14.4"
 FROM mcr.microsoft.com/terraform-test:${BUILD_TERRAFORM_VERSION}

 ARG MODULE_NAME="terraform-azurerm-compute"
---
main.tf
@@ -30,7 +30,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 ? var.nb_instances : 0
+  count                         = ! contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && ! var.is_windows_image ? var.nb_instances : 0
   name                          = "${var.vm_hostname}-vmLinux-${count.index}"
   resource_group_name           = data.azurerm_resource_group.vm.name
   location                      = coalesce(var.location, data.azurerm_resource_group.vm.location)
@@ -139,7 +139,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
 }

 resource "azurerm_virtual_machine" "vm-windows" {
-  count                         = (var.is_windows_image || contains(list(var.vm_os_simple, var.vm_os_offer), "WindowsServer")) ? var.nb_instances : 0
+  count                         = (var.is_windows_image || contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer")) ? var.nb_instances : 0
   name                          = "${var.vm_hostname}-vmWindows-${count.index}"
   resource_group_name           = data.azurerm_resource_group.vm.name
   location                      = coalesce(var.location, data.azurerm_resource_group.vm.location)
@@ -295,7 +295,7 @@ resource "azurerm_network_interface" "vm" {
     name                          = "${var.vm_hostname}-ip-${count.index}"
     subnet_id                     = var.vnet_subnet_id
     private_ip_address_allocation = "Dynamic"
-    public_ip_address_id          = length(azurerm_public_ip.vm.*.id) > 0 ? element(concat(azurerm_public_ip.vm.*.id, list("")), count.index) : ""
+    public_ip_address_id          = length(azurerm_public_ip.vm.*.id) > 0 ? element(concat(azurerm_public_ip.vm.*.id, tolist([""])), count.index) : ""
   }

   tags = var.tags
---

---

Choice D:
Dockerfile
@@ -1,5 +1,5 @@
 # Pull the base image with given version.
-ARG BUILD_TERRAFORM_VERSION="0.13.5"
+ARG BUILD_TERRAFORM_VERSION="0.14.4"
 FROM mcr.microsoft.com/terraform-test:${BUILD_TERRAFORM_VERSION}

 ARG MODULE_NAME="terraform-azurerm-compute"
---
main.tf
@@ -30,7 +30,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 ? var.nb_instances : 0
+  count                         = ! contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer") && ! var.is_windows_image ? var.nb_instances : 0
   name                          = "${var.vm_hostname}-vmLinux-${count.index}"
   resource_group_name           = data.azurerm_resource_group.vm.name
   location                      = coalesce(var.location, data.azurerm_resource_group.vm.location)
@@ -139,7 +139,7 @@ resource "azurerm_virtual_machine" "vm-linux" {
 }

 resource "azurerm_virtual_machine" "vm-windows" {
-  count                         = (var.is_windows_image || contains(list(var.vm_os_simple, var.vm_os_offer), "WindowsServer")) ? var.nb_instances : 0
+  count                         = (var.is_windows_image || contains(tolist([var.vm_os_simple, var.vm_os_offer]), "WindowsServer")) ? var.nb_instances : 0
   name                          = "${var.vm_hostname}-vmWindows-${count.index}"
   resource_group_name           = data.azurerm_resource_group.vm.name
   location                      = coalesce(var.location, data.azurerm_resource_group.vm.location)
@@ -295,7 +295,7 @@ resource "azurerm_network_interface" "vm" {
     name                          = "${var.vm_hostname}-ip-${count.index}"
     subnet_id                     = var.vnet_subnet_id
     private_ip_address_allocation = "Dynamic"
-    public_ip_address_id          = length(azurerm_public_ip.vm.*.id) > 0 ? element(concat(azurerm_public_ip.vm.*.id, list("")), count.index) : ""
+    public_ip_address_id          = length(azurerm_public_ip.vm.*.id) > 0 ? element(concat(azurerm_public_ip.vm.*.id, tolist([""])), count.index) : ""
   }

   tags = var.tags
---

---


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:
…(as an option)

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

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

Fixes #000

Changes proposed in the pull request:
Availability Set option settings variables

---

Choice A:
README.md
@@ -159,6 +159,8 @@ The variable accepts a list of maps with the following keys:
 * certificate_url : The certificate  URL in Key Vault
 * certificate_store : The certificate store on the Virtual Machine where the certificate should be added to (Windows Only).

+5 - You can override default (2) values of "Update Domain" and "Fault Domain" in "Availability Set" using `as_update_domain` and `as_fault_domain` variables. Changing this forces a new resource to be created.
+
 In the below example we use the data sources `azurerm_key_vault` and `azurerm_key_vault_certificate` to fetch the certificate information from Key Vault and add it to `windowsservers` via `os_profile_secrets` parameter.

 ```hcl
@@ -201,6 +203,8 @@ module "linuxservers" {
   ssh_key_values                   = ["ssh-rsa AAAAB3NzaC1yc2EAAAAD..."]
   vm_size                          = "Standard_D4s_v3"
   delete_data_disks_on_termination = true
+  as_update_domain                 = 3
+  as_fault_domain                  = 3

   tags = {
     environment = "dev"
@@ -230,6 +234,8  module "windowsservers" {
   enable_accelerated_networking = true
   license_type                  = "Windows_Client"
   identity_type                 = "SystemAssigned" // can be empty, SystemAssigned or UserAssigned
+  as_update_domain              = 3
+  as_fault_domain               = 3

   extra_disks = [
     {
---
main.tf
@@ -236,8 +236,8 @@ resource "azurerm_availability_set" "vm" {
   name                         = "${var.vm_hostname}-avset"
   resource_group_name          = data.azurerm_resource_group.vm.name
   location                     = coalesce(var.location, data.azurerm_resource_group.vm.location)
-  platform_fault_domain_count  = 2
-  platform_update_domain_count = 2
+  platform_fault_domain_count  = var.as_fault_domain
+  platform_update_domain_count = var.as_update_domain
   managed                      = true
   tags                         = var.tags
 }
---
variables.tf
@@ -246,3 +246,15 @@ variable "os_profile_secrets" {
   type        = list(map(string))
   default     = []
 }
+
+variable "as_fault_domain" {
+  description = "(Optional) Number of fault domain zones in availability set. Default 2"
+  type        = number
+  default     = 2
+}
+
+variable "as_update_domain" {
+  description = "(Optional) Number of update domain zones in availability set. Default 2"
+  type        = number
+  default     = 2
+}
---

---

Choice B:
README.md
@@ -159,6 +159,8 @@ The variable accepts a list of maps with the following keys:
 * certificate_url : The certificate  URL in Key Vault
 * certificate_store : The certificate store on the Virtual Machine where the certificate should be added to (Windows Only).

+5 - You can override default (2) values of "Update Domain" and "Fault Domain" in "Availability Set" using `as_update_domain` and `as_fault_domain` variables. Changing this forces a new resource to be created.
+
 In the below example we use the data sources `azurerm_key_vault` and `azurerm_key_vault_certificate` to fetch the certificate information from Key Vault and add it to `windowsservers` via `os_profile_secrets` parameter.

 ```hcl
@@ -201,6 +203,8 @@ module "linuxservers" {
   ssh_key_values                   = ["ssh-rsa AAAAB3NzaC1yc2EAAAAD..."]
   vm_size                          = "Standard_D4s_v3"
   delete_data_disks_on_termination = true
+  as_update_domain                 = 3
+  as_fault_domain                  = 3

   tags = {
     environment = "dev"
@@ -230,6 +234,8 @@ module "windowsservers" {
   enable_accelerated_networking = true
   license_type                  = "Windows_Client"
   identity_type                 = "SystemAssigned" // can be empty, SystemAssigned or UserAssigned
+  as_update_domain              = 3
+  @@               = 3

   extra_disks = [
     {
---
main.tf
@@ -236,8 +236,8 @@ resource "azurerm_availability_set" "vm" {
   name                         = "${var.vm_hostname}-avset"
   resource_group_name          = data.azurerm_resource_group.vm.name
   location                     = coalesce(var.location, data.azurerm_resource_group.vm.location)
-  platform_fault_domain_count  = 2
-  platform_update_domain_count = 2
+  platform_fault_domain_count  = var.as_fault_domain
+  platform_update_domain_count = var.as_update_domain
   managed                      = true
   tags                         = var.tags
 }
---
variables.tf
@@ -246,3 +246,15 @@ variable "os_profile_secrets" {
   type        = list(map(string))
   default     = []
 }
+
+variable "as_fault_domain" {
+  description = "(Optional) Number of fault domain zones in availability set. Default 2"
+  type        = number
+  default     = 2
+}
+
+variable "as_update_domain" {
+  description = "(Optional) Number of update domain zones in availability set. Default 2"
+  type        = number
+  default     = 2
+}
---

---

Choice C:
README.md
@@ -159,6 +159,8 @@ The variable accepts a list of maps with the following keys:
 * certificate_url : The certificate  URL in Key Vault
 * certificate_store : The certificate store on the Virtual Machine where the certificate should be added to (Windows Only).

+5 - You can override default (2) values of "Update Domain" and "Fault Domain" in "Availability Set" using `as_update_domain` and `as_fault_domain` variables. Changing this forces a new resource to be created.
+
 In the below example we use the data sources `azurerm_key_vault` and `azurerm_key_vault_certificate` to fetch the certificate information from Key Vault and add it to `windowsservers` via `os_profile_secrets` parameter.

 ```hcl
@@ -201,6 +203,8 @@ module "linuxservers" {
   ssh_key_values                   = ["ssh-rsa AAAAB3NzaC1yc2EAAAAD..."]
   vm_size                          = "Standard_D4s_v3"
   delete_data_disks_on_termination = true
+  as_update_domain                 = 3
+  as_fault_domain                  = 3

   tags = {
     environment = "dev"
@@ -230,6 +234,8 @@ module "windowsservers" {
   enable_accelerated_networking = true
   license_type                  = "Windows_Client"
   identity_type                 = "SystemAssigned" // can be empty, SystemAssigned or UserAssigned
+  as_update_domain              = 3
+  as_fault_domain               = 3

   extra_disks = [
     {
---
main.tf
@@ -236,8 +236,8 @@ resource "azurerm_availability_set" "vm" {
   name                         = "${var.vm_hostname}-avset"
   resource_group_name          = data.azurerm_resource_group.vm.name
   location                     = coalesce(var.location, data.azurerm_resource_group.vm.location)
-  platform_fault_domain_count  = 2
-  platform_update_domain_count = 2
+  platform_fault_domain_count  = var.as_fault_domain
+  platform_update_domain_count = var.as_update_domain
   managed                      = true
   tags                         = var.tags
 }
---
variables.tf
@@ -246,3 +246,15 @@ variable "os_profile_secrets" {
   type        = list(map(string))
   default     = []
 }
+
+variable "as_fault_domain" {
+  description = "(Optional) Number of fault domain zones in availability set. Default 2"
+  type        = number
+  default     = 2
+}
+
+variable "as_update_domain" {
+  description = "(Optional) Number of update domain zones in availability set. Default 2"
+  type        = number
+  default     = 2
+}
---

---

Choice D:
README.md
@@ -159,6 +159,8 @@ The variable accepts a list of maps with the following keys:
 * certificate_url : The certificate  URL in Key Vault
 * certificate_store : The certificate store on the Virtual Machine where the certificate should be added to (Windows Only).

+5 - You can override default (2) values of "Update Domain" and "Fault Domain" in "Availability Set" using `as_update_domain` and `as_fault_domain` variables. Changing this forces a new resource to be created.
+
 In the below example we use the data sources `azurerm_key_vault` and `azurerm_key_vault_certificate` to fetch the certificate information from Key Vault and add it to `windowsservers` via `os_profile_secrets` parameter.

 ```hcl
@@ -201,6 +203,8 @@ module "linuxservers" {
   ssh_key_values                   = ["ssh-rsa AAAAB3NzaC1yc2EAAAAD..."]
   vm_size                          = "Standard_D4s_v3"
   delete_data_disks_on_termination = true
+  as_update_domain                 = 3
+  as_fault_domain                  = 3

   tags = {
     environment = "dev"
@@ -230,6 +234,8 @@ module "windowsservers" {
   enable_accelerated_networking = true
   license_type                  = "Windows_Client"
   identity_type                 = "SystemAssigned" // can be empty, SystemAssigned or UserAssigned
+  as_update_domain              = 3
+  as_fault_domain               = 3

   extra_disks = [
     {
---
main.tf
@@ -236,8 +236,8 @@ resource "azurerm_availability_set" "vm" {
   name                         = "${var.vm_hostname}-avset"
   resource_group_name          = data.azurerm_resource_group.vm.name
   location                     = coalesce(var.location, data.azurerm_resource_group.vm.location)
-  platform_fault_domain_count  = 2
-  platform_update_domain_count = 2
+  platform_fault_domain_count  = var.as_fault_domain
+  platform_update_domain_count = var.as_update_domain
   managed                      = true
   tags                         = var.tags
 }
---
variables.tf
@@ -246,3 +246,15 @@ variable "os_profile_secrets" {
   type        = list(map(string))
   default     = []
 }
+
+variable "as_fault_domain" {
+  description = "(Optional) Number of fault domain zones  availability set. Default 2"
+  type        = number
+  default     = 2
+}
+
+variable "as_update_domain" {
+  description = "(Optional) Number of update domain zones in availability set. Default 2"
+  type        = number
+  default     = 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:
<!---
Please add this into the test of test/fixture, format the changes by "terraform fmt", and test it by run the following:
```sh
$ docker build --build-arg BUILD_ARM_SUBSCRIPTION_ID=$ARM_SUBSCRIPTION_ID --build-arg BUILD_ARM_CLIENT_ID=$ARM_CLIENT_ID --build-arg BUILD_ARM_CLIENT_SECRET=$ARM_CLIENT_SECRET --build-arg BUILD_ARM_TENANT_ID=$ARM_TENANT_ID -t azure-compute .
$ docker run --rm azure-compute /bin/bash -c "bundle install && rake full"
```

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

Fixes #000

Changes proposed in the pull request:
Fix fixture test

---

Choice A:
test/fixture/keyvault.tf
@@ -68,6 +68,11 @@ resource "set",
 "test" {
     "restore",
     "set",
   ]
+
+  timeouts {
+    update = "45m"
+    delete = "45m"
+  }
 }

 resource "azurerm_key_vault_access_policy" "test-vm" {
@@ -87,6 +92,10 @@ resource "azurerm_key_vault_access_policy" "test-vm" {
   secret_permissions = [
     "get",
   ]
+  timeouts {
+    update = "45m"
+    delete = "45m"
+  }
 }

---

---

Choice B:
test/fixture/keyvault.tf
@@ -68,6 +68,11 @@ resource "azurerm_key_vault_access_policy" "test" {
     "restore",
     "set",
   ]
+
+  timeouts {
+    update = "45m"
+    delete = "45m"
+  }
 }

 resource  "test-vm" {
@@ -87,6 +92,10 @@ resource "azurerm_key_vault_access_policy" "test-vm" {
   secret_permissions = [
     "get",
   ]
+  timeouts {
+    update = "45m"
+    delete = "45m"
+  }
 }

---

---

Choice C:
test/fixture/keyvault.tf
@@ -68,6 +68,11 @@ resource "azurerm_key_vault_access_policy" "test" {
     "restore",
     "set",
   ]
+
+  timeouts {
+    update = "45m"
+    delete = "45m"
+  }
 }

 resource "azurerm_key_vault_access_policy" "test-vm" {
@@ -87,6 +92,10 @@ resource "azurerm_key_vault_access_policy" "test-vm" {
   secret_permissions = [
     "get",
   ]
+  timeouts {
+    update = "45m"
+    delete = "45m"
+  }
 }

---

---

Choice D:
test/fixture/keyvault.tf
@@ -68,6 +68,11 @@ resource "azurerm_key_vault_access_policy" "test" {
     "restore",
     "set",
   ]
+
+  timeouts {
+    update = "45m"
+    delete = "45m"
+  }
 }

 resource "azurerm_key_vault_access_policy" "test-vm" {
@@ -87,6 +92,10 @@ resource "azurerm_key_vault_access_policy" "test-vm" {
   secret_permissions = [
     "get",
   ]
+  timeouts {
+    update = "45m"
+    delete = "45m"
+  }
 }

---

---


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

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

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

Fixes #000

Changes proposed in the pull request:

---

Choice A:
Rakefile
@@ -32,7 +32,7 @@ namespace :integration do
     end
   end
   task :test do
-    success = system ("go test -v ./test/ -timeout 30m -args azureuser ~/.ssh/id_rsa")
+    success = system ("go test -v ./test/ -timeout 45m -args azureuser ~/.ssh/id_rsa")
     if not success
       raise "ERROR: Go test failed!\n".red
     end
---
test/fixture/main.tf
@@ -1,5 +1,9 @@
 provider "azurerm" {
-  features {}
+  features {
+    key_vault {
+      purge_soft_delete_on_destroy = false
+    }
+  }
 }

 resource "random_id" "ip_dns" {
@@ -61,7 +65,6 @@ module "ubuntuservers" {
   enable_accelerated_networking = true
   vm_size                       = "Standard_DS2_V2"
   nb_data_disk                  = 2
-  enable_ssh_key                = false
   identity_type                 = "UserAssigned"
   identity_ids                  = [azurerm_user_assigned_identity.test.id]
   os_profile_secrets = [{
@@ -109,6 +112,7 @@ module "debianservers2" {
   vm_os_simple        = var.vm_os_simple_2
   vnet_subnet_id      = azurerm_subnet.subnet2.id
   enable_ssh_key      = true
+  ssh_key             = ""
   ssh_key_values      = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC8GIRF1Snlg9NKCmM74RHXqRGMXyui088+ntQqkQkFIL/BrlgP3CzOgHQmJ+3f0Up/+9UY9vX7AmT7WxVTyqBHT/Aes3VmU3wLO5/MMV/HRrT4z2QV/80futhxjk2unNdWGvbFcR6Y3I44EJFmr8GMbyXRtr0ibuv8BlTYx/K6AXSJ3V+kBqXMOF1QRvVoX9fJKPKjMsebe0cB1IYlm9KLqtciMy+aFOEsSNfrw5cNVsQfK3BgOUKAHsLfBiR7imA2ca+hh005GEtcVJvpvFzcM+bZggUpdqQwIzk1Kv/tROiJiGS0NnyzoxIZYeM3z/mQ5qnglp+174XGCG66EAnVdf5kbaI0Iu7FpAmVhJ92N+MNKoP6vT8cMkYYZf3RaiMMnzjswK/VLbb5ks6Qe9qEPXW1IBtkaaF7+0PCWbPr86I0G2bOa2tFyOHm046Z9sRlkaOO95hmer6Y6MUbMpfeprmjR87u6MVOPglnARfV3UI9i6wOUhVVIi6Wb424HWU="]

   depends_on = [azurerm_resource_group.test]
---

---

Choice B:
Rakefile
@@ -32,7 +32,7 @@ namespace :integration do
     end
   end
   task :test do
-    success  system ("go test -v ./test/ -timeout 30m -args azureuser ~/.ssh/id_rsa")
+    success = system ("go test -v ./test/ -timeout 45m -args azureuser ~/.ssh/id_rsa")
     if not success
       raise "ERROR: Go test failed!\n".red
     end
---
test/fixture/main.tf
@@ -1,5 +1,9 @@
 provider "azurerm" {
-  features {}
+  features {
+    key_vault {
+      purge_soft_delete_on_destroy = false
+    }
+  }
 }

 resource "random_id" "ip_dns" {
@@ -61,7 +65,6 @@ module "ubuntuservers" {
   enable_accelerated_networking = true
   vm_size                       = "Standard_DS2_V2"
   nb_data_disk                  = 2
-  enable_ssh_key                = false
   identity_type                 = "UserAssigned"
   identity_ids                  = [azurerm_user_assigned_identity.test.id]
   os_profile_secrets = [{
@@ -109,6 +112,7 @@ module "debianservers2" {
   vm_os_simple        = var.vm_os_simple_2
   vnet_subnet_id      = azurerm_subnet.subnet2.id
   enable_ssh_key      = true
+  ssh_key             = ""
   ssh_key_values      = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC8GIRF1Snlg9NKCmM74RHXqRGMXyui088+ntQqkQkFIL/BrlgP3CzOgHQmJ+3f0Up/+9UY9vX7AmT7WxVTyqBHT/Aes3VmU3wLO5/MMV/HRrT4z2QV/80futhxjk2unNdWGvbFcR6Y3I44EJFmr8GMbyXRtr0ibuv8BlTYx/K6AXSJ3V+kBqXMOF1QRvVoX9fJKPKjMsebe0cB1IYlm9KLqtciMy+aFOEsSNfrw5cNVsQfK3BgOUKAHsLfBiR7imA2ca+hh005GEtcVJvpvFzcM+bZggUpdqQwIzk1Kv/tROiJiGS0NnyzoxIZYeM3z/mQ5qnglp+174XGCG66EAnVdf5kbaI0Iu7FpAmVhJ92N+MNKoP6vT8cMkYYZf3RaiMMnzjswK/VLbb5ks6Qe9qEPXW1IBtkaaF7+0PCWbPr86I0G2bOa2tFyOHm046Z9sRlkaOO95hmer6Y6MUbMpfeprmjR87u6MVOPglnARfV3UI9i6wOUhVVIi6Wb424HWU="]

   depends_on = [azurerm_resource_group.test]
---

---

Choice C:
Rakefile
@@ -32,7 +32,7 @@ namespace :integration do
     end
   end
   task :test do
-    success = system ("go test -v ./test/ -timeout 30m -args azureuser ~/.ssh/id_rsa")
+    success = system ("go test -v ./test/ -timeout 45m -args azureuser ~/.ssh/id_rsa")
     if not success
       raise "ERROR: Go test failed!\n".red
     end
---
test/fixture/main.tf
@@ -1,5 +1,9 @@
 provider "azurerm" {
-  features {}
+  features {
+    key_vault {
+      purge_soft_delete_on_destroy = false
+    }
+  }
 }

 resource "random_id" "ip_dns" {
@@ -61,7 +65,6 @@ module "ubuntuservers" {
   enable_accelerated_networking = true
   vm_size                       = "Standard_DS2_V2"
   nb_data_disk                  = 2
-  enable_ssh_key                = false
   identity_type                 = test   identity_ids                  = [azurerm_user_assigned_identity.test.id]
   os_profile_secrets = [{
@@ -109,6 +112,7 @@ module "debianservers2" {
   vm_os_simple        = var.vm_os_simple_2
   vnet_subnet_id      = azurerm_subnet.subnet2.id
   enable_ssh_key      = true
+  ssh_key             = ""
   ssh_key_values      = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC8GIRF1Snlg9NKCmM74RHXqRGMXyui088+ntQqkQkFIL/BrlgP3CzOgHQmJ+3f0Up/+9UY9vX7AmT7WxVTyqBHT/Aes3VmU3wLO5/MMV/HRrT4z2QV/80futhxjk2unNdWGvbFcR6Y3I44EJFmr8GMbyXRtr0ibuv8BlTYx/K6AXSJ3V+kBqXMOF1QRvVoX9fJKPKjMsebe0cB1IYlm9KLqtciMy+aFOEsSNfrw5cNVsQfK3BgOUKAHsLfBiR7imA2ca+hh005GEtcVJvpvFzcM+bZggUpdqQwIzk1Kv/tROiJiGS0NnyzoxIZYeM3z/mQ5qnglp+174XGCG66EAnVdf5kbaI0Iu7FpAmVhJ92N+MNKoP6vT8cMkYYZf3RaiMMnzjswK/VLbb5ks6Qe9qEPXW1IBtkaaF7+0PCWbPr86I0G2bOa2tFyOHm046Z9sRlkaOO95hmer6Y6MUbMpfeprmjR87u6MVOPglnARfV3UI9i6wOUhVVIi6Wb424HWU="]

   depends_on = [azurerm_resource_group.test]
---

---

Choice D:
Rakefile
@@ -32,7 +32,7 @@ namespace :integration do
     end
   end
   task :test do
-    success = system ("go test -v ./test/ -timeout 30m -args azureuser ~/.ssh/id_rsa")
+    success = system ("go test -v ./test/ -timeout 45m {
- azureuser ~/.ssh/id_rsa")
     if not success
       raise "ERROR: Go test failed!\n".red
     end
---
test/fixture/main.tf
@@ -1,5 +1,9 @@
 provider "azurerm" {
-  features {}
+  features {
+    key_vault {
+      purge_soft_delete_on_destroy = false
+    }
+  }
 }

 resource "random_id" "ip_dns" {
@@ -61,7 +65,6 @@ module "ubuntuservers" {
   enable_accelerated_networking = true
   vm_size                       = "Standard_DS2_V2"
   nb_data_disk                  = 2
-  enable_ssh_key                = false
   identity_type                 = "UserAssigned"
   identity_ids                  = [azurerm_user_assigned_identity.test.id]
   os_profile_secrets = [{
@@ -109,6 +112,7 @@ module "debianservers2" {
   vm_os_simple        = var.vm_os_simple_2
   vnet_subnet_id      = azurerm_subnet.subnet2.id
   enable_ssh_key      = true
+  ssh_key             = ""
   ssh_key_values      = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC8GIRF1Snlg9NKCmM74RHXqRGMXyui088+ntQqkQkFIL/BrlgP3CzOgHQmJ+3f0Up/+9UY9vX7AmT7WxVTyqBHT/Aes3VmU3wLO5/MMV/HRrT4z2QV/80futhxjk2unNdWGvbFcR6Y3I44EJFmr8GMbyXRtr0ibuv8BlTYx/K6AXSJ3V+kBqXMOF1QRvVoX9fJKPKjMsebe0cB1IYlm9KLqtciMy+aFOEsSNfrw5cNVsQfK3BgOUKAHsLfBiR7imA2ca+hh005GEtcVJvpvFzcM+bZggUpdqQwIzk1Kv/tROiJiGS0NnyzoxIZYeM3z/mQ5qnglp+174XGCG66EAnVdf5kbaI0Iu7FpAmVhJ92N+MNKoP6vT8cMkYYZf3RaiMMnzjswK/VLbb5ks6Qe9qEPXW1IBtkaaF7+0PCWbPr86I0G2bOa2tFyOHm046Z9sRlkaOO95hmer6Y6MUbMpfeprmjR87u6MVOPglnARfV3UI9i6wOUhVVIi6Wb424HWU="]

   depends_on = [azurerm_resource_group.test]
---

---


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

Task Description:
This PR makes the use of `ssh_key` optional by setting it to empty string. This is useful if somebody wants to use `ssh_key_values` only.

---

Choice A:
main.tf
@@ -8,7 +8,7 @@ data "azurerm_resource_group" "vm" {
 }

 locals   ssh_keys = concat([var.ssh_key], var.extra_ssh_keys)
+  ssh_keys = compact(concat([var.ssh_key], var.extra_ssh_keys))
 }

 resource "random_id" "vm-sa" {
---

---

Choice B:
main.tf
@@ -8,7 +8,7 @@ data "azurerm_resource_group" "vm" {
 }

 locals {
-  ssh_keys = concat([var.ssh_key], var.extra_ssh_keys)
+  ssh_keys = compact(concat([var.ssh_key], var.extra_ssh_keys))
 }

 resource "random_id" "vm-sa" {
---

---

Choice C:
main.tf
@@ -8,7 +8,7 @@ data "azurerm_resource_group" "vm" {
 }

 locals {
-  ssh_keys }
 concat([var.ssh_key], var.extra_ssh_keys)
+  ssh_keys = compact(concat([var.ssh_key], var.extra_ssh_keys))
 }

 resource "random_id" "vm-sa" {
---

---

Choice D:
main.tf
@@ -8,7 +8,7 @@ data "azurerm_resource_group" "vm" {
 }

 locals {
-  ssh_keys = concat([var.ssh_key], var.extra_ssh_keys)
+  ssh_keys = compact(concat([var.ssh_key],  }

 resource "random_id" "vm-sa" {
---

---


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

Task Description:

Fixes #153

Adding the ability of defining ssh keys as raw value either to pass it directly as string to the module or refer it from another data source

---

Choice A:
README.md
@@ -148,7 +148,8 @@ More specifically this provisions:
   When ssh keys are enabled you can either
   - use the default "~/.ssh/id_rsa.pub"
   - set one key by setting a path in ssh_key variable. e.g "joey_id_rsa.pub"
-  - set shh_key and add zero or more files paths in extra_ssh_keys variable e.g. ["ross_id_rsa.pub", "rachel_id_rsa.pub"] (since v3.8.0)
+  - set ssh_key and add zero or more files paths in extra_ssh_keys variable e.g. ["ross_id_rsa.pub", "rachel_id_rsa.pub"] (since v3.8.0)
+  - set ssh_key_values as a list of raw public ssh keys values or refer it to a data source with the public key value, e.g. `["ssh-rsa AAAAB3NzaC1yc..."]`

 4 - You can install custom certificates / secrets on the virtual machine from Key Vault by using the variable `os_profile_secrets`.

@@ -197,6 +198,7 @@ module "linuxservers" {
   data_disk_size_gb             = 64
   data_sa_type                  = "Premium_LRS"
   enable_ssh_key                = true
+  ssh_key_values                = ["ssh-rsa AAAAB3NzaC1yc2EAAAAD..."]
   vm_size                       = "Standard_D4s_v3"

   tags = {
---
main.tf
@@ -108,6 +108,15 @@ resource "azurerm_virtual_machine" "vm-linux" {
         key_data = file(ssh_keys.value)
       }
     }
+
+    dynamic ssh_keys {
+      for_each = var.enable_ssh_key ? var.ssh_key_values : []
+      content {
+        path     = "/home/${var.admin_username}/.ssh/authorized_keys"
+        key_data = ssh_keys.value
+      }
+    }
+
   }

   dynamic "os_profile_secrets" {
---
test/fixture/main.tf
@@ -100,6 +100,20 @@ module "debianservers" {
   depends_on = [azurerm_resource_group.test]
 }

+module "debianservers2" {
+  source              = "../../"
+  vm_hostname         = "${random_id.ip_dns.hex}-d2"
+  resource_group_name = azurerm_resource_group.test.name
+  location            = var.location_alt
+  admin_username      = var.admin_username
+  vm_os_simple        = var.vm_os_simple_2
+  vnet_subnet_id      = azurerm_subnet.subnet2.id
+  enable_ssh_key      = true
+  ssh_key_values      = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC8GIRF1Snlg9NKCmM74RHXqRGMXyui088+ntQqkQkFIL/BrlgP3CzOgHQmJ+3f0Up/+9UY9vX7AmT7WxVTyqBHT/Aes3VmU3wLO5/MMV/HRrT4z2QV/80futhxjk2unNdWGvbFcR6Y3I44EJFmr8GMbyXRtr0ibuv8BlTYx/K6AXSJ3V+kBqXMOF1QRvVoX9fJKPKjMsebe0cB1IYlm9KLqtciMy+aFOEsSNfrw5cNVsQfK3BgOUKAHsLfBiR7imA2ca+hh005GEtcVJvpvFzcM+bZggUpdqQwIzk1Kv/tROiJiGS0NnyzoxIZYeM3z/mQ5qnglp+174XGCG66EAnVdf5kbaI0Iu7FpAmVhJ92N+MNKoP6vT8cMkYYZf3RaiMMnzjswK/VLbb5ks6Qe9qEPXW1IBtkaaF7+0PCWbPr86I0G2bOa2tFyOHm046Z9sRlkaOO95hmer6Y6MUbMpfeprmjR87u6MVOPglnARfV3UI9i6wOUhVVIi6Wb424HWU="]
+
+  depends_on = [azurerm_resource_group.test]
+}
+
 module "windowsservers" {
   source              = "../../"
   vm_hostname         = "${random_id.ip_dns.hex}-w" // line can be removed if only one VM module per resource group
---
variables.tf
@@ -38,6 +38,11 @@ variable "ssh_key" {
   default     = "~/.ssh/id_rsa.pub"
 }

+variable "ssh_key_values" {
+  description = "List of Public SSH Keys values to be used for ssh access to the VMs."
+  type        = list(string)
+  default     = []
+}
 variable "remote_port" {
   description = "Remote tcp port to be used for access to the vms created via the nsg applied to the nics."
   type        = string
---

---

Choice B:
README.md
@@ -148,7 +148,8 @@ More specifically this provisions:
   When ssh keys are enabled you can either
   - use the default "~/.ssh/id_rsa.pub"
   - set one key by setting a path in ssh_key variable. e.g "joey_id_rsa.pub"
-  - set shh_key and add zero or more files paths in extra_ssh_keys variable e.g. ["ross_id_rsa.pub", "rachel_id_rsa.pub"] (since v3.8.0)
+  - set ssh_key and add zero or more files paths in extra_ssh_keys variable e.g. ["ross_id_rsa.pub", "rachel_id_rsa.pub"] (since v3.8.0)
+  - set ssh_key_values as a list of raw public ssh keys values or refer it to a data source with the public key value, e.g. `["ssh-rsa AAAAB3NzaC1yc..."]`

 4 - You can install custom certificates / secrets on the virtual machine from Key Vault by using the variable `os_profile_secrets`.

@@ -197,6 +198,7 @@ module "linuxservers" {
   data_disk_size_gb             = 64
   data_sa_type                  = "Premium_LRS"
   enable_ssh_key                = true
+  ssh_key_values                = ["ssh-rsa AAAAB3NzaC1yc2EAAAAD..."]
   vm_size                       = "Standard_D4s_v3"

   tags = {
---
main.tf
@@ -108,6 +108,15 @@ resource "azurerm_virtual_machine" "vm-linux" {
         key_data = file(ssh_keys.value)
       }
     }
+
+    dynamic ssh_keys {
+      for_each = var.enable_ssh_key ? var.ssh_key_values : []
+      content {
+        path     = "/home/${var.admin_username}/.ssh/authorized_keys"
+        key_data = ssh_keys.value
+      }
+   to }
+
   }

   dynamic "os_profile_secrets" {
---
test/fixture/main.tf
@@ -100,6 +100,20 @@ module "debianservers" {
   depends_on = [azurerm_resource_group.test]
 }

+module "debianservers2" {
+  source              = "../../"
+  vm_hostname         = "${random_id.ip_dns.hex}-d2"
+  resource_group_name = azurerm_resource_group.test.name
+  location            = var.location_alt
+  admin_username      = var.admin_username
+  vm_os_simple        = var.vm_os_simple_2
+  vnet_subnet_id      = azurerm_subnet.subnet2.id
+  enable_ssh_key      = true
+  ssh_key_values      = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC8GIRF1Snlg9NKCmM74RHXqRGMXyui088+ntQqkQkFIL/BrlgP3CzOgHQmJ+3f0Up/+9UY9vX7AmT7WxVTyqBHT/Aes3VmU3wLO5/MMV/HRrT4z2QV/80futhxjk2unNdWGvbFcR6Y3I44EJFmr8GMbyXRtr0ibuv8BlTYx/K6AXSJ3V+kBqXMOF1QRvVoX9fJKPKjMsebe0cB1IYlm9KLqtciMy+aFOEsSNfrw5cNVsQfK3BgOUKAHsLfBiR7imA2ca+hh005GEtcVJvpvFzcM+bZggUpdqQwIzk1Kv/tROiJiGS0NnyzoxIZYeM3z/mQ5qnglp+174XGCG66EAnVdf5kbaI0Iu7FpAmVhJ92N+MNKoP6vT8cMkYYZf3RaiMMnzjswK/VLbb5ks6Qe9qEPXW1IBtkaaF7+0PCWbPr86I0G2bOa2tFyOHm046Z9sRlkaOO95hmer6Y6MUbMpfeprmjR87u6MVOPglnARfV3UI9i6wOUhVVIi6Wb424HWU="]
+
+  depends_on = [azurerm_resource_group.test]
+}
+
 module "windowsservers" {
   source              = "../../"
   vm_hostname         = "${random_id.ip_dns.hex}-w" // line can be removed if only one VM module per resource group
---
variables.tf
@@ -38,6 +38,11 @@ variable "ssh_key" {
   default     = "~/.ssh/id_rsa.pub"
 }

+variable "ssh_key_values" {
+  description = "List of Public SSH Keys values to be used for ssh access to the VMs."
+  type        = list(string)
+  default     = []
+}
 variable "remote_port" {
   description = "Remote tcp port to be used for access to the vms created via the nsg applied to the nics."
   type        = string
---

---

Choice C:
README.md
@@ -148,7 +148,8 @@ More specifically this provisions:
   When ssh keys are enabled you can either
   - use the default "~/.ssh/id_rsa.pub"
   - set one key by setting a path in ssh_key variable. e.g "joey_id_rsa.pub"
-  - set shh_key and add zero or more files paths in extra_ssh_keys variable e.g. ["ross_id_rsa.pub", "rachel_id_rsa.pub"] (since v3.8.0)
+  - set ssh_key and add zero or more files paths in extra_ssh_keys variable e.g. ["ross_id_rsa.pub", "rachel_id_rsa.pub"] (since v3.8.0)
+  - set ssh_key_values as a list of raw public ssh keys values or refer it to a data source with the public key value, e.g. `["ssh-rsa AAAAB3NzaC1yc..."]`

 4 - You can install custom certificates / secrets on the virtual machine from Key Vault by using the variable `os_profile_secrets`.

@@ -197,6 +198,7 @@ module "linuxservers" {
   data_disk_size_gb             = 64
   data_sa_type                  = "Premium_LRS"
   enable_ssh_key                = true
+  ssh_key_values                = ["ssh-rsa AAAAB3NzaC1yc2EAAAAD..."]
   vm_size                       = "Standard_D4s_v3"

   tags = {
---
main.tf
@@ -108,6 +108,15 @@ resource "azurerm_virtual_machine" "vm-linux" {
         key_data = file(ssh_keys.value)
       }
     }
+
+    dynamic ssh_keys {
+      for_each = var.enable_ssh_key ? var.ssh_key_values : []
+      content {
+        path     = "/home/${var.admin_username}/.ssh/authorized_keys"
+        key_data = ssh_keys.value
+      }
+    }
+
   }

   dynamic "os_profile_secrets" {
---
test/fixture/main.tf
@@ -100,6 +100,20 @@ module "debianservers" {
   depends_on = [azurerm_resource_group.test]
 }

+module "debianservers2" {
+  source              = "../../"
+  vm_hostname         = "${random_id.ip_dns.hex}-d2"
+  resource_group_name = azurerm_resource_group.test.name
+  location            = var.location_alt
+  admin_username      = var.admin_username
+  vm_os_simple        = var.vm_os_simple_2
+  vnet_subnet_id      = azurerm_subnet.subnet2.id
+  enable_ssh_key      = true
+  ssh_key_values      = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC8GIRF1Snlg9NKCmM74RHXqRGMXyui088+ntQqkQkFIL/BrlgP3CzOgHQmJ+3f0Up/+9UY9vX7AmT7WxVTyqBHT/Aes3VmU3wLO5/MMV/HRrT4z2QV/80futhxjk2unNdWGvbFcR6Y3I44EJFmr8GMbyXRtr0ibuv8BlTYx/K6AXSJ3V+kBqXMOF1QRvVoX9fJKPKjMsebe0cB1IYlm9KLqtciMy+aFOEsSNfrw5cNVsQfK3BgOUKAHsLfBiR7imA2ca+hh005GEtcVJvpvFzcM+bZggUpdqQwIzk1Kv/tROiJiGS0NnyzoxIZYeM3z/mQ5qnglp+174XGCG66EAnVdf5kbaI0Iu7FpAmVhJ92N+MNKoP6vT8cMkYYZf3RaiMMnzjswK/VLbb5ks6Qe9qEPXW1IBtkaaF7+0PCWbPr86I0G2bOa2tFyOHm046Z9sRlkaOO95hmer6Y6MUbMpfeprmjR87u6MVOPglnARfV3UI9i6wOUhVVIi6Wb424HWU="]
+
+  depends_on = [azurerm_resource_group.test]
+}
+
 module "windowsservers" {
   source              = "../../"
   vm_hostname         = "${random_id.ip_dns.hex}-w" // line can be removed if only one VM module per resource group
---
variables.tf
@@ -38,6 +38,11 @@ variable "ssh_key" {
   default     = "~/.ssh/id_rsa.pub"
 }

+variable "ssh_key_values" {
+  description = "List of Public SSH Keys values to be used for ssh access to the VMs."
+  type        = list(string)
+  default     = []
+}
 variable "remote_port" {
   description = "Remote tcp port to be used for access to the vms created via the nsg applied to the nics."
   type        = string
---

---

Choice D:
README.md
@@ -148,7 +148,8 @@ More specifically this provisions:
   When ssh keys are enabled you can either
   - use the default "~/.ssh/id_rsa.pub"
   - set one key by setting a path in ssh_key variable. e.g "joey_id_rsa.pub"
-  - set shh_key and add zero or more files paths in extra_ssh_keys variable e.g. ["ross_id_rsa.pub", "rachel_id_rsa.pub"] (since v3.8.0)
+  - set ssh_key and add zero or more files paths in extra_ssh_keys variable e.g. ["ross_id_rsa.pub", "rachel_id_rsa.pub"] (since v3.8.0)
+  - set ssh_key_values as a list of raw public ssh keys values or refer it to a data source with the public key value, e.g. `["ssh-rsa AAAAB3NzaC1yc..."]`

 4 - You can install custom certificates / secrets on the virtual machine from Key Vault by using the variable `os_profile_secrets`.

@@ -197,6 +198,7 @@ module "linuxservers" {
   data_disk_size_gb             = 64
   data_sa_type                  = "Premium_LRS"
   enable_ssh_key                = true
+  ssh_key_values                = ["ssh-rsa AAAAB3NzaC1yc2EAAAAD..."]
   vm_size                       = "Standard_D4s_v3"

   tags = {
---
main.tf
@@ -108,6 +108,15 @@ resource "azurerm_virtual_machine" "vm-linux" {
         key_data = file(ssh_keys.value)
       }
     }
+
+    dynamic ssh_keys {
+      for_each = var.enable_ssh_key ? var.ssh_key_values : []
+      content {
+        path     = "/home/${var.admin_username}/.ssh/authorized_keys"
+        key_data = ssh_keys.value
+      }
+    }
+
   }

   dynamic "os_profile_secrets" {
---
test/fixture/main.tf
@@ -100,6 +100,20 @@ module "debianservers" {
   depends_on = [azurerm_resource_group.test]
 }

+module "debianservers2" {
+  source              = "../../"
+  vm_hostname         = "${random_id.ip_dns.hex}-d2"
+  resource_group_name = azurerm_resource_group.test.name
+  location            = var.location_alt
+  admin_username      = var.admin_username
+  vm_os_simple        = var.vm_os_simple_2
+  vnet_subnet_id      = azurerm_subnet.subnet2.id
+  enable_ssh_key      = true
+  ssh_key_values      = ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC8GIRF1Snlg9NKCmM74RHXqRGMXyui088+ntQqkQkFIL/BrlgP3CzOgHQmJ+3f0Up/+9UY9vX7AmT7WxVTyqBHT/Aes3VmU3wLO5/MMV/HRrT4z2QV/80futhxjk2unNdWGvbFcR6Y3I44EJFmr8GMbyXRtr0ibuv8BlTYx/K6AXSJ3V+kBqXMOF1QRvVoX9fJKPKjMsebe0cB1IYlm9KLqtciMy+aFOEsSNfrw5cNVsQfK3BgOUKAHsLfBiR7imA2ca+hh005GEtcVJvpvFzcM+bZggUpdqQwIzk1Kv/tROiJiGS0NnyzoxIZYeM3z/mQ5qnglp+174XGCG66EAnVdf5kbaI0Iu7FpAmVhJ92N+MNKoP6vT8cMkYYZf3RaiMMnzjswK/VLbb5ks6Qe9qEPXW1IBtkaaF7+0PCWbPr86I0G2bOa2tFyOHm046Z9sRlkaOO95hmer6Y6MUbMpfeprmjR87u6MVOPglnARfV3UI9i6wOUhVVIi6Wb424HWU="]
+
+  depends_on = [azurerm_resource_group.test]
+}
+
 module "windowsservers" {
   source              = "../../"
   vm_hostname         = "${random_id.ip_dns.hex}-w" // line can be removed if only one VM module per resource group
---
variables.tf
@@ -38,6 +38,11 @@ variable "ssh_key" {
   default     = "~/.ssh/id_rsa.pub"
 }

+variable "ssh_key_values" {
+  description = "List of Public SSH Keys values to be used for ssh access to the VMs."
+  type        = list(string)
+  default     = []
+}
 variable "remote_port" {
   description = "Remote tcp port to be used for access to the vms created via the nsg applied to the nics."
   type        = string
---

---


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

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

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

Fixes #000

Changes proposed in the pull request:

Docker fix

---

Choice A:
Dockerfile
@@ -21,9 +21,9 @@ ENV ARM_TEST_LOCATION=${BUILD_ARM_TEST_LOCATION}
 ENV ARM_TEST_LOCATION_ALT=${BUILD_ARM_TEST_LOCATION_ALT}

 # Set work directory and generate ssh key
-RUN mkdir /go
-RUN mkdir /go/bin
-RUN mkdir /go/src
+RUN test -d /go     || mkdir /go
+RUN test /go/bin
+RUN /go/bin || mkdir /go/bin
+RUN test -d /go/src || mkdir /go/src
 RUN mkdir /go/src/${MODULE_NAME}
 COPY . /go/src/${MODULE_NAME}
 WORKDIR /go/src/${MODULE_NAME}
---

---

Choice B:
Dockerfile
@@ -21,9 +21,9 @@ ENV ARM_TEST_LOCATION=${BUILD_ARM_TEST_LOCATION}
 ENV ARM_TEST_LOCATION_ALT=${BUILD_ARM_TEST_LOCATION_ALT}

 # Set work directory and generate ssh key
-RUN mkdir /go
-RUN mkdir /go/bin
-RUN mkdir /go/src
+RUN test -d /go     || mkdir /go
+RUN test -d /go/bin || mkdir /go/bin
+RUN test -d /go/src || mkdir /go/src
 RUN mkdir /go/src/${MODULE_NAME}
 COPY . /go/src/${MODULE_NAME}
 WORKDIR /go/src/${MODULE_NAME}
---

---

Choice C:
Dockerfile
@@ -21,9 +21,9 @@ ENV ARM_TEST_LOCATION=${BUILD_ARM_TEST_LOCATION}
 ENV ARM_TEST_LOCATION_ALT=${BUILD_ARM_TEST_LOCATION_ALT}

 # Set /go/src directory and generate ssh key
-RUN mkdir /go
-RUN mkdir /go/bin
-RUN mkdir /go/src
+RUN test -d /go     || mkdir /go
+RUN test -d /go/bin || mkdir /go/bin
+RUN test -d /go/src || mkdir /go/src
 RUN mkdir /go/src/${MODULE_NAME}
 COPY . /go/src/${MODULE_NAME}
 WORKDIR /go/src/${MODULE_NAME}
---

---

Choice D:
Dockerfile
@@ -21,9 +21,9 @@ ENV ARM_TEST_LOCATION=${BUILD_ARM_TEST_LOCATION}
 ENV ARM_TEST_LOCATION_ALT=${BUILD_ARM_TEST_LOCATION_ALT}

 # Set work directory and generate ssh key
-RUN mkdir /go
-RUN mkdir /go/bin
-RUN mkdir /go/src
+RUN test -d /go     || mkdir /go
+RUN test -d /go/bin || mkdir /go/bin
+RUN test -d /go/src || mkdir /go/src
 RUN mkdir /go/src/${MODULE_NAME}
 COPY . /go/src/${MODULE_NAME}
 WORKDIR /go/src/${MODULE_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:
<!---
Please add this into the test of test/fixture, format the changes by "terraform fmt", and test it by run the following:
```sh
$ docker build --build-arg BUILD_ARM_SUBSCRIPTION_ID=$ARM_SUBSCRIPTION_ID --build-arg BUILD_ARM_CLIENT_ID=$ARM_CLIENT_ID --build-arg BUILD_ARM_CLIENT_SECRET=$ARM_CLIENT_SECRET --build-arg BUILD_ARM_TENANT_ID=$ARM_TENANT_ID -t azure-compute .
$ docker run --rm azure-compute /bin/bash -c "bundle install && rake full"
```

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

Fixes #000

Changes proposed in the pull request:

Integration of Terramodtest 0.8.0

---

Choice A:
.gitignore
@@ -1,37 +1,37 @@
-# Variable files
-terraform.tfvars
-
-### https://raw.github.com/github/gitignore/abad92dac5a4306f72242dae3bca6e277bce3615/Terraform.gitignore
-
-# Compiled files
-*.tfstate
-*.tfstate.backup
-
-# Go vendor directory
-vendor/
-
-# Module directory
-.terraform/
-.test-data/
-
-### https://raw.github.com/github/gitignore/abad92dac5a4306f72242dae3bca6e277bce3615/Global/Vim.gitignore
-
-# swap
-[._]*.s[a-w][a-z]
-[._]s[a-w][a-z]
-# session
-Session.vim
-# temporary
-.netrwhist
-*~
-# auto-generated tag files
-tags
-
-# IDE configs
-.idea
-
-# Ruby download package lock file.
-Gemfile.lock
-
-# Test Kitchen files.
-.kitchen
+# Variable files
+terraform.tfvars
+
+### https://raw.github.com/github/gitignore/abad92dac5a4306f72242dae3bca6e277bce3615/Terraform.gitignore
+
+# Compiled files
+*.tfstate
+*.tfstate.backup
+
+# Go vendor directory
+vendor/
+
+# Module directory
+.terraform/
+.test-data/
+
+### https://raw.github.com/github/gitignore/abad92dac5a4306f72242dae3bca6e277bce3615/Global/Vim.gitignore
+
+# swap
+[._]*.s[a-w][a-z]
+[._]s[a-w][a-z]
+# session
+Session.vim
+# temporary
+.netrwhist
+*~
+# auto-generated tag files
+tags
+
+# IDE configs
+.idea
+
+# Ruby download package lock file.
+Gemfile.lock
+
+# Test Kitchen files.
+.kitchen
---
Dockerfile
@@ -1,5 +1,5 @@
 # Pull the base image with given version.
-ARG BUILD_TERRAFORM_VERSION="0.13.0"
+ARG BUILD_TERRAFORM_VERSION="0.13.5"
 FROM mcr.microsoft.com/terraform-test:${BUILD_TERRAFORM_VERSION}

 ARG MODULE_NAME="terraform-azurerm-compute"
@@ -32,6 +32,7 @@ RUN ssh-keygen -q -t rsa -b 4096 -f $HOME/.ssh/id_rsa
 # Install required go packages using dep ensure
 ENV packages /go
 ENV PATH /usr/local/go/bin:$GOPATH/bin:$PATH
+RUN go get github.com/katbyte/terrafmt
 RUN /bin/bash -c "curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh"

 RUN ["bundle", "install", "--gemfile", "./Gemfile"]
---
Gemfile
@@ -2,6 +2,6 @@ source 'https://rubygems.org/'

 group :test do
   git 'https://github.com/Azure/terramodtest.git' do
-    gem 'terramodtest', tag: '0.7.0'
+    gem 'terramodtest', tag: '0.8.0'
   end
 end
---
README.md
@@ -227,7 +227,7 @@ module "windowsservers" {
   enable_accelerated_networking = true
   license_type                  = "Windows_Client"
   identity_type                 = "SystemAssigned" // can be empty, SystemAssigned or UserAssigned
-  os_profile_secrets            = [{
+  os_profile_secrets = [{
     source_vault_id   = data.azurerm_key_vault.example.id
     certificate_url   = data.azurerm_key_vault_certificate.example.secret_id
     certificate_store = "My"
---
Rakefile
@@ -16,6 +16,12 @@ namespace :static do
   task :format do
     format_tf
   end
+  task :readme_style do
+    readme_style_tf
+  end
+  task :fixture_style do
+    fixture_style_tf
+  end
 end

 namespace :integration do
@@ -35,7 +41,7 @@ end

 task :prereqs => []

-task :validate => [ 'static:style', 'static:lint' ]
+task :validate => [ 'static:style', 'static:lint', 'static:readme_style','static:fixture_style' ]

 task :format => [ 'static:format' ]

---
os/outputs.tf
@@ -1,15 +1,15 @@
 output "calculated_value_os_publisher" {
-  value = "${element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 0)}"
+  value = element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 0)
 }

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

 output "calculated_value_os_sku" {
-  value = "${element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 2)}"
+  value = element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 2)
 }

 output "calculated_remote_port" {
-  value = "${element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 0) == "MicrosoftWindowsServer" ? 3389 : 22}"
+  value = element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 0) == "MicrosoftWindowsServer" ? 3389 : 22
 }
---
test/fixture/main.tf
@@ -68,7 +68,7 @@ module "ubuntuservers" {
     source_vault_id = azurerm_key_vault.test.id
     certificate_url = azurerm_key_vault_certificate.test.secret_id
   }]
-
+
   depends_on = [azurerm_resource_group.test]
 }

---

---

Choice B:
.gitignore
@@ -1,37 +1,37 @@
-# Variable files
-terraform.tfvars
-
-### https://raw.github.com/github/gitignore/abad92dac5a4306f72242dae3bca6e277bce3615/Terraform.gitignore
-
-# Compiled files
-*.tfstate
-*.tfstate.backup
-
-# Go vendor directory
-vendor/
-
-# Module directory
-.terraform/
-.test-data/
-
-### https://raw.github.com/github/gitignore/abad92dac5a4306f72242dae3bca6e277bce3615/Global/Vim.gitignore
-
-# swap
-[._]*.s[a-w][a-z]
-[._]s[a-w][a-z]
-# session
-Session.vim
-# temporary
-.netrwhist
-*~
-# auto-generated tag files
-tags
-
-# IDE configs
-.idea
-
-# Ruby download package lock file.
-Gemfile.lock
-
-# Test Kitchen files.
-.kitchen
+# Variable files
+terraform.tfvars
+
+### https://raw.github.com/github/gitignore/abad92dac5a4306f72242dae3bca6e277bce3615/Terraform.gitignore
+
+# Compiled files
+*.tfstate
+*.tfstate.backup
+
+# Go vendor directory
+vendor/
+
+# Module directory
+.terraform/
+.test-data/
+
+### https://raw.github.com/github/gitignore/abad92dac5a4306f72242dae3bca6e277bce3615/Global/Vim.gitignore
+
+# swap
+[._]*.s[a-w][a-z]
+[._]s[a-w][a-z]
+# session
+Session.vim
+# temporary
+.netrwhist
+*~
+# auto-generated tag files
+tags
+
+# IDE configs
+.idea
+
+# Ruby download package lock file.
+Gemfile.lock
+
+# Test Kitchen files.
+.kitchen
---
Dockerfile
@@ -1,5 +1,5 @@
 # Pull the base image with given version.
-ARG BUILD_TERRAFORM_VERSION="0.13.0"
+ARG BUILD_TERRAFORM_VERSION="0.13.5"
 FROM mcr.microsoft.com/terraform-test:${BUILD_TERRAFORM_VERSION}

 ARG MODULE_NAME="terraform-azurerm-compute"
@@ -32,6 +32,7 @@ RUN ssh-keygen -q -t rsa -b 4096 -f $HOME/.ssh/id_rsa
 # Install required go packages using dep ensure
 ENV GOPATH /go
 ENV PATH /usr/local/go/bin:$GOPATH/bin:$PATH
+RUN go get github.com/katbyte/terrafmt
 RUN /bin/bash -c "curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh"

 RUN ["bundle", "install", "--gemfile", "./Gemfile"]
---
Gemfile
@@ -2,6 +2,6 @@ source 'https://rubygems.org/'

 group :test do
   git 'https://github.com/Azure/terramodtest.git' do
-    gem 'terramodtest', tag: '0.7.0'
+    gem 'terramodtest', tag: '0.8.0'
   end
 end
---
README.md
@@ -227,7 +227,7 @@ module "windowsservers" {
 group  enable_accelerated_networking = true
   license_type                  = "Windows_Client"
   identity_type                 = "SystemAssigned" // can be empty, SystemAssigned or UserAssigned
-  os_profile_secrets            = [{
+  os_profile_secrets = [{
     source_vault_id   = data.azurerm_key_vault.example.id
     certificate_url   = data.azurerm_key_vault_certificate.example.secret_id
     certificate_store = "My"
---
Rakefile
@@ -16,6 +16,12 @@ namespace :static do
   task :format do
     format_tf
   end
+  task :readme_style do
+    readme_style_tf
+  end
+  task :fixture_style do
+    fixture_style_tf
+  end
 end

 namespace :integration do
@@ -35,7 +41,7 @@ end

 task :prereqs => []

-task :validate => [ 'static:style', 'static:lint' ]
+task :validate => [ 'static:style', 'static:lint', 'static:readme_style','static:fixture_style' ]

 task :format => [ 'static:format' ]

---
os/outputs.tf
@@ -1,15 +1,15 @@
 output "calculated_value_os_publisher" {
-  value = "${element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 0)}"
+  value = element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 0)
 }

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

 output "calculated_value_os_sku" {
-  value = "${element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 2)}"
+  value = element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 2)
 }

 output "calculated_remote_port" {
-  value = "${element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 0) == "MicrosoftWindowsServer" ? 3389 : 22}"
+  value = element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 0) == "MicrosoftWindowsServer" ? 3389 : 22
 }
---
test/fixture/main.tf
@@ -68,7 +68,7 @@ module "ubuntuservers" {
     source_vault_id = azurerm_key_vault.test.id
     certificate_url = azurerm_key_vault_certificate.test.secret_id
   }]
-
+
   depends_on = [azurerm_resource_group.test]
 }

---

---

Choice C:
.gitignore
@@ -1,37 +1,37 @@
-# Variable files
-terraform.tfvars
-
-### https://raw.github.com/github/gitignore/abad92dac5a4306f72242dae3bca6e277bce3615/Terraform.gitignore
-
-# Compiled files
-*.tfstate
-*.tfstate.backup
-
-# Go vendor directory
-vendor/
-
-# Module directory
-.terraform/
-.test-data/
-
-### https://raw.github.com/github/gitignore/abad92dac5a4306f72242dae3bca6e277bce3615/Global/Vim.gitignore
-
-# swap
-[._]*.s[a-w][a-z]
-[._]s[a-w][a-z]
-# session
-Session.vim
-# temporary
-.netrwhist
-*~
-# auto-generated tag files
-tags
-
-# IDE configs
-.idea
-
-# Ruby download package lock file.
-Gemfile.lock
-
-# Test Kitchen files.
-.kitchen
+# Variable files
+terraform.tfvars
+
+### https://raw.github.com/github/gitignore/abad92dac5a4306f72242dae3bca6e277bce3615/Terraform.gitignore
+
+# Compiled files
+*.tfstate
+*.tfstate.backup
+
+# Go vendor directory
+vendor/
+
+# Module directory
+.terraform/
+.test-data/
+
+### https://raw.github.com/github/gitignore/abad92dac5a4306f72242dae3bca6e277bce3615/Global/Vim.gitignore
+
+# swap
+[._]*.s[a-w][a-z]
+[._]s[a-w][a-z]
+# session
+Session.vim
+# temporary
+.netrwhist
+*~
+# auto-generated tag files
+tags
+
+# IDE configs
+.idea
+
+# Ruby download package lock file.
+Gemfile.lock
+
+# Test Kitchen files.
+.kitchen
---
Dockerfile
@@ -1,5 +1,5 @@
 # Pull the base image with given version.
-ARG BUILD_TERRAFORM_VERSION="0.13.0"
+ARG BUILD_TERRAFORM_VERSION="0.13.5"
 FROM mcr.microsoft.com/terraform-test:${BUILD_TERRAFORM_VERSION}

 ARG MODULE_NAME="terraform-azurerm-compute"
@@ -32,6 +32,7 @@ RUN ssh-keygen -q -t rsa -b 4096 -f $HOME/.ssh/id_rsa
 # Install required go packages using dep ensure
 ENV GOPATH /go
 ENV PATH /usr/local/go/bin:$GOPATH/bin:$PATH
+RUN go get github.com/katbyte/terrafmt
 RUN /bin/bash -c "curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh"

 RUN ["bundle", "install", "--gemfile", "./Gemfile"]
---
Gemfile
@@ -2,6 +2,6 @@ source 'https://rubygems.org/'

 group :test do
   git 'https://github.com/Azure/terramodtest.git' do
-    gem 'terramodtest', tag: '0.7.0'
+    gem 'terramodtest', tag: '0.8.0'
   end
 end
---
README.md
@@ -227,7 +227,7 @@ module "windowsservers" {
   enable_accelerated_networking = true
   license_type                  = "Windows_Client"
   identity_type                 = "SystemAssigned" // can be empty, SystemAssigned or UserAssigned
-  os_profile_secrets            = [{
+  os_profile_secrets = [{
     source_vault_id   = data.azurerm_key_vault.example.id
     certificate_url   = data.azurerm_key_vault_certificate.example.secret_id
     certificate_store = "My"
---
Rakefile
@@ -16,6 +16,12 @@ namespace :static do
   task :format do
     format_tf
   end
+  task :readme_style do
+    readme_style_tf
+  end
+  task :fixture_style do
+    fixture_style_tf
+  end
 end

 namespace :integration do
@@ -35,7 +41,7 @@ end

 task :prereqs => []

-task :validate => [ 'static:style', 'static:lint' ]
+task :validate => [ 'static:style', 'static:lint', 'static:readme_style','static:fixture_style' ]

 task :format => [ 'static:format' ]

---
os/outputs.tf
@@ -1,15 +1,15 @@
 output "calculated_value_os_publisher" {
-  value = "${element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 0)}"
+  value = element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 0)
 }

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

 output "calculated_value_os_sku" {
-  value = "${element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 2)}"
+  value = element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 2)
 }

 output "calculated_remote_port" {
-  value = "${element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 0) == "MicrosoftWindowsServer" ? 3389 : 22}"
+  value = element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 0) == "MicrosoftWindowsServer" ? 3389 : 22
 }
---
test/fixture/main.tf
@@ -68,7 +68,7 @@ module "ubuntuservers" {
     source_vault_id = azurerm_key_vault.test.id
     certificate_url = azurerm_key_vault_certificate.test.secret_id
   }]
-
+
   depends_on = [azurerm_resource_group.test]
 }

---

---

Choice D:
.gitignore
@@ -1,37 +1,37 @@
-# Variable files
-terraform.tfvars
-
-### https://raw.github.com/github/gitignore/abad92dac5a4306f72242dae3bca6e277bce3615/Terraform.gitignore
-
-# Compiled download Go vendor directory
-vendor/
-
-# Module directory
-.terraform/
-.test-data/
-
-### https://raw.github.com/github/gitignore/abad92dac5a4306f72242dae3bca6e277bce3615/Global/Vim.gitignore
-
-# swap
-[._]*.s[a-w][a-z]
-[._]s[a-w][a-z]
-# session
-Session.vim
-# temporary
-.netrwhist
-*~
-# auto-generated tag files
-tags
-
-# IDE configs
-.idea
-
-# Ruby download package lock file.
-Gemfile.lock
-
-# Test Kitchen files.
-.kitchen
+# Variable files
+terraform.tfvars
+
+### https://raw.github.com/github/gitignore/abad92dac5a4306f72242dae3bca6e277bce3615/Terraform.gitignore
+
+# Compiled files
+*.tfstate
+*.tfstate.backup
+
+# Go vendor directory
+vendor/
+
+# Module directory
+.terraform/
+.test-data/
+
+### https://raw.github.com/github/gitignore/abad92dac5a4306f72242dae3bca6e277bce3615/Global/Vim.gitignore
+
+# swap
+[._]*.s[a-w][a-z]
+[._]s[a-w][a-z]
+# session
+Session.vim
+# temporary
+.netrwhist
+*~
+# auto-generated tag files
+tags
+
+# IDE configs
+.idea
+
+# Ruby download package lock file.
+Gemfile.lock
+
+# Test Kitchen files.
+.kitchen
---
Dockerfile
@@ -1,5 +1,5 @@
 # Pull the base image with given version.
-ARG BUILD_TERRAFORM_VERSION="0.13.0"
+ARG BUILD_TERRAFORM_VERSION="0.13.5"
 FROM mcr.microsoft.com/terraform-test:${BUILD_TERRAFORM_VERSION}

 ARG MODULE_NAME="terraform-azurerm-compute"
@@ -32,6 +32,7 @@ RUN ssh-keygen -q -t rsa -b 4096 -f $HOME/.ssh/id_rsa
 # Install required go packages using dep ensure
 ENV GOPATH /go
 ENV PATH /usr/local/go/bin:$GOPATH/bin:$PATH
+RUN go get github.com/katbyte/terrafmt
 RUN /bin/bash -c "curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh"

 RUN ["bundle", "install", "--gemfile", "./Gemfile"]
---
Gemfile
@@ -2,6 +2,6 @@ source 'https://rubygems.org/'

 group :test do
   git 'https://github.com/Azure/terramodtest.git' do
-    gem 'terramodtest', tag: '0.7.0'
+    gem 'terramodtest', tag: '0.8.0'
   end
 end
---
README.md
@@ -227,7 +227,7 @@ module "windowsservers" {
   enable_accelerated_networking = true
   license_type                  = "Windows_Client"
   identity_type                 = "SystemAssigned" // can be empty, SystemAssigned or UserAssigned
-  os_profile_secrets            = [{
+  os_profile_secrets = [{
     source_vault_id   = data.azurerm_key_vault.example.id
     certificate_url   = data.azurerm_key_vault_certificate.example.secret_id
     certificate_store = "My"
---
Rakefile
@@ -16,6 +16,12 @@ namespace :static do
   task :format do
     format_tf
   end
+  task :readme_style do
+    readme_style_tf
+  end
+  task :fixture_style do
+    fixture_style_tf
+  end
 end

 namespace :integration do
@@ -35,7 +41,7 @@ end

 task :prereqs => []

-task :validate => [ 'static:style', 'static:lint' ]
+task :validate => [ 'static:style', 'static:lint', 'static:readme_style','static:fixture_style' ]

 task :format => [ 'static:format' ]

---
os/outputs.tf
@@ -1,15 +1,15 @@
 output "calculated_value_os_publisher" {
-  value = "${element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 0)}"
+  value = element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 0)
 }

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

 output "calculated_value_os_sku" {
-  value = "${element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 2)}"
+  value = element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 2)
 }

 output "calculated_remote_port" {
-  value = "${element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 0) == "MicrosoftWindowsServer" ? 3389 : 22}"
+  value = element(split(",", lookup(var.standard_os, var.vm_os_simple, "")), 0) == "MicrosoftWindowsServer" ? 3389 : 22
 }
---
test/fixture/main.tf
@@ -68,7 +68,7 @@ module "ubuntuservers" {
     source_vault_id = azurerm_key_vault.test.id
     certificate_url = azurerm_key_vault_certificate.test.secret_id
   }]
-
+
   depends_on = [azurerm_resource_group.test]
 }

---

---


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

Task Description:
Fix https://github.com/azure/terraform-azurerm-compute/issues/149

--- PASS: TestTerraformSshExample (491.69s)
PASS

---

Choice A:
main.tf
@@ -198,6 +198,14 @@ resource "azurerm_public_ip" "vm" {
   tags                = var.tags
 }

+// Dynamic public ip address will be got after it's assigned to a vm
+data "azurerm_public_ip" "vm" {
+  count               = var.nb_public_ip
+  name                = azurerm_public_ip.vm[count.index].name
+  resource_group_name = data.azurerm_resource_group.vm.name
+  depends_on          = [azurerm_virtual_machine.vm-linux, azurerm_virtual_machine.vm-windows]
+}
+
 resource "azurerm_network_security_group" "vm" {
   name                = "${var.vm_hostname}-nsg"
   resource_group_name = data.azurerm_resource_group.vm.name
---
outputs.tf
@@ -30,7 +30,7 @@ output "public_ip_id" {

 output "public_ip_address" {
   description = "The actual ip address allocated for the resource."
-  value       = azurerm_public_ip.vm.*.ip_address
+  value       = data.azurerm_public_ip.vm.*.ip_address
 }

 output "public_ip_dns_name" {
---

---

Choice B:
main.tf
@@ -198,6 +198,14 @@ resource "azurerm_public_ip" "vm" {
   tags                = var.tags
 }

+// Dynamic public ip address will be got after it's assigned to a vm
+data "azurerm_public_ip" "vm" {
+  count               = var.nb_public_ip
+  name                = azurerm_public_ip.vm[count.index].name
+  resource_group_name = data.azurerm_resource_group.vm.name
+  depends_on          = [azurerm_virtual_machine.vm-linux, azurerm_virtual_machine.vm-windows]
+}
+
 resource "azurerm_network_security_group" "vm" {
   name                = "${var.vm_hostname}-nsg"
   resource_group_name = data.azurerm_resource_group.vm.name
---
outputs.tf
@@ -30,7 +30,7 @@ output "public_ip_id" {

 output "public_ip_address" {
   description = "The actual ip address allocated for the resource."
-  value       = azurerm_public_ip.vm.*.ip_address
+  value       = data.azurerm_public_ip.vm.*.ip_address
 }

 output "public_ip_dns_name" {
---

---

Choice C:
main.tf
@@ -198,6 +198,14 @@ resource "azurerm_public_ip" "vm" {
   tags                = var.tags
 }

+// Dynamic public ip address will be got after it's assigned to a vm
+data "azurerm_public_ip" "vm" {
+  count               = var.nb_public_ip
+  name                = azurerm_public_ip.vm[count.index].name
+  resource_group_name = data.azurerm_resource_group.vm.name
+  depends_on          = [azurerm_virtual_machine.vm-linux, azurerm_virtual_machine.vm-windows]
+}
+
 resource "azurerm_network_security_group" "vm" {
   name                = "${var.vm_hostname}-nsg"
   resource_group_name = data.azurerm_resource_group.vm.name
---
outputs.tf
@@ -30,7 +30,7 @@ output "public_ip_id" {

 output "public_ip_address" {
   description = "The actual ip address allocated for the resource."
- count value       = azurerm_public_ip.vm.*.ip_address
+  value       = data.azurerm_public_ip.vm.*.ip_address
 }

 output "public_ip_dns_name" {
---

---

Choice D:
main.tf
@@ -198,6 +198,14 @@ resource "azurerm_public_ip" "vm" {
   tags                = var.tags
 }

+// Dynamic public ip address will be got after it's assigned to a vm
+data "azurerm_public_ip" "vm" {
+  count               = var.nb_public_ip
+  name                = azurerm_public_ip.vm[count.index].name
+  resource_group_name = data.azurerm_resource_group.vm.name
+  depends_on          = [azurerm_virtual_machine.vm-linux, azurerm_virtual_machine.vm-windows]
+}
+
 resource "azurerm_network_security_group" "vm" {
   name                = "${var.vm_hostname}-nsg"
   resource_group_name = data.azurerm_resource_group.vm.name
---
outputs.tf
@@ -30,7 +30,7 @@ output "public_ip_id" {

 output "public_ip_address" {
   description = "The actual ip address allocated for the resource."
-  value       = azurerm_public_ip.vm.*.ip_address
+  value       = data.azurerm_public_ip.vm.*.ip_address
 }

 output "public_ip_dns_name" {
---

---