-
Notifications
You must be signed in to change notification settings - Fork 305
/
outputs.tf
62 lines (51 loc) · 2.38 KB
/
outputs.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
output "availability_set_id" {
description = "Id of the availability set where the vms are provisioned. If `var.zones` is set, this output will return empty string."
value = join("", azurerm_availability_set.vm[*].id)
}
output "network_interface_ids" {
description = "ids of the vm nics provisoned."
value = azurerm_network_interface.vm[*].id
}
output "network_interface_private_ip" {
description = "private ip addresses of the vm nics"
value = azurerm_network_interface.vm[*].private_ip_address
}
output "network_security_group_id" {
description = "id of the security group provisioned"
value = local.network_security_group_id
}
output "network_security_group_name" {
description = "name of the security group provisioned, empty if no security group was created."
value = join("", concat(azurerm_network_security_group.vm[*].name, [""]))
}
output "public_ip_address" {
description = "The actual ip address allocated for the resource."
value = data.azurerm_public_ip.vm[*].ip_address
}
output "public_ip_dns_name" {
description = "fqdn to connect to the first vm provisioned."
value = azurerm_public_ip.vm[*].fqdn
}
output "public_ip_id" {
description = "id of the public ip address provisoned."
value = azurerm_public_ip.vm[*].id
}
output "vm_identity" {
description = "map with key `Virtual Machine Id`, value `list of identity` created for the Virtual Machine."
value = zipmap(concat([for m in azurerm_virtual_machine.vm_windows : m.id], [for m in azurerm_virtual_machine.vm_linux : m.id]), concat(azurerm_virtual_machine.vm_windows[*].identity, azurerm_virtual_machine.vm_linux[*].identity))
}
output "vm_ids" {
description = "Virtual machine ids created."
value = concat(azurerm_virtual_machine.vm_windows[*].id, azurerm_virtual_machine.vm_linux[*].id)
}
output "vm_names" {
description = "Virtual machine names created."
value = {
linux = azurerm_virtual_machine.vm_linux[*].name
windows = azurerm_virtual_machine.vm_windows[*].name
}
}
output "vm_zones" {
description = "map with key `Virtual Machine Id`, value `list of the Availability Zone` which the Virtual Machine should be allocated in."
value = zipmap(concat(azurerm_virtual_machine.vm_windows[*].id, azurerm_virtual_machine.vm_linux[*].id), concat(azurerm_virtual_machine.vm_windows[*].zones, azurerm_virtual_machine.vm_linux[*].zones))
}