Skip to content

Commit 055c7c2

Browse files
committed
add windows machines to outputs
1 parent 2b07397 commit 055c7c2

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

test_code/AZURE_MACHINES/outputs.tf

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
output "fab_hosts" {
2-
value = { for key, value in azurerm_linux_virtual_machine.linux_host_test :
2+
value = merge({
3+
for key, value in azurerm_linux_virtual_machine.linux_host_test :
4+
"AZURE_${key}" => {
5+
"host" = value.public_ip_address
6+
"name" = value.name
7+
"user" = var.AZURE_MACHINE_CONFIGS[key].default_user
8+
"connect_kwargs" = {
9+
"key_filename" : var.PRIVATE_KEY_PATH
10+
}
11+
"public_ssh_link" = "ssh -i ${var.PRIVATE_KEY_PATH} ${var.AZURE_MACHINE_CONFIGS[key].default_user}@${value.public_ip_address}"
12+
"sleep" : var.AZURE_MACHINE_CONFIGS[key].sleep
13+
}
14+
},
15+
{
16+
for key, value in azurerm_windows_virtual_machine.windows_host_test :
317
"AZURE_${key}" => {
418
"host" = value.public_ip_address
519
"name" = value.name
@@ -11,4 +25,5 @@ output "fab_hosts" {
1125
"sleep" : var.AZURE_MACHINE_CONFIGS[key].sleep
1226
}
1327
}
28+
)
1429
}

0 commit comments

Comments
 (0)