@@ -23,8 +23,7 @@ resource "azurerm_linux_virtual_machine" "linux_host_test" {
23
23
azurerm_network_interface_security_group_association . linux_host_test
24
24
]
25
25
for_each = local. compute_instances
26
- name = replace (format (var. name_format , " ${ each . key } -vm" ), local. str_f , local. str_r )
27
- computer_name = each. key
26
+ name = replace (format (var. name_format , " ${ each . key } -machine" ), local. str_f , local. str_r )
28
27
resource_group_name = azurerm_resource_group. linux_host_test . name
29
28
location = azurerm_resource_group. linux_host_test . location
30
29
size = each. value . machine_type
@@ -53,13 +52,14 @@ resource "azurerm_linux_virtual_machine" "linux_host_test" {
53
52
custom_data = filebase64 (each. value . user_data )
54
53
}
55
54
56
- resource "azurerm_windows_virtual_machine" "linux_host_test " {
55
+ resource "azurerm_windows_virtual_machine" "windows_host_test " {
57
56
# https://azapril.dev/2020/05/12/terraform-depends_on/
58
57
depends_on = [
59
58
azurerm_network_interface_security_group_association . linux_host_test
60
59
]
61
60
for_each = local. win_instances
62
- name = replace (format (var. name_format , " ${ each . key } -machine" ), local. str_f , local. str_r )
61
+ name = replace (format (var. name_format , " ${ each . key } -vm" ), local. str_f , local. str_r )
62
+ computer_name = each. value . computer_name
63
63
resource_group_name = azurerm_resource_group. linux_host_test . name
64
64
location = azurerm_resource_group. linux_host_test . location
65
65
size = each. value . machine_type
0 commit comments