Skip to content

Commit 4d99758

Browse files
committed
fix computer name for w10
1 parent 940abcd commit 4d99758

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

test_code/AZURE_MACHINES/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ resource "azurerm_linux_virtual_machine" "linux_host_test" {
2424
]
2525
for_each = local.compute_instances
2626
name = replace(format(var.name_format, "${each.key}-vm"), local.str_f, local.str_r)
27-
computer_name = each.key
2827
resource_group_name = azurerm_resource_group.linux_host_test.name
2928
location = azurerm_resource_group.linux_host_test.location
3029
size = each.value.machine_type
@@ -60,6 +59,7 @@ resource "azurerm_windows_virtual_machine" "linux_host_test" {
6059
]
6160
for_each = local.win_instances
6261
name = replace(format(var.name_format, "${each.key}-machine"), local.str_f, local.str_r)
62+
computer_name = each.value.computer_name
6363
resource_group_name = azurerm_resource_group.linux_host_test.name
6464
location = azurerm_resource_group.linux_host_test.location
6565
size = each.value.machine_type

test_code/AZURE_MACHINES/variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ variable "AZURE_WIN_MACHINE_CONFIGS" {
102102
description = "Windows 10 Enterprise 21H2"
103103
default_user = "test-user"
104104
default_password = "km$3MWPf&i6r4o@I"
105+
computer_name = "W10ENT21H2"
105106
wait = "120"
106107
user_data = "user_data/windows.ps"
107108
source_image_reference = {
-583 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)