This repository has been archived by the owner on Jun 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoutput.tf
54 lines (44 loc) · 2.43 KB
/
output.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
output "resource_group_name" {
description = "The name of the resource group in which resources are created"
value = element(coalescelist(data.azurerm_resource_group.rgrp.*.name, azurerm_resource_group.rg.*.name, [""]), 0)
}
output "resource_group_id" {
description = "The id of the resource group in which resources are created"
value = element(coalescelist(data.azurerm_resource_group.rgrp.*.id, azurerm_resource_group.rg.*.id, [""]), 0)
}
output "resource_group_location" {
description = "The location of the resource group in which resources are created"
value = element(coalescelist(data.azurerm_resource_group.rgrp.*.location, azurerm_resource_group.rg.*.location, [""]), 0)
}
output "virtual_network_name" {
description = "The name of the virtual network"
value = element(concat(azurerm_virtual_network.vnet.*.name, [""]), 0)
}
output "virtual_network_id" {
description = "The id of the virtual network"
value = element(concat(azurerm_virtual_network.vnet.*.id, [""]), 0)
}
output "virtual_network_address_space" {
description = "List of address spaces that are used the virtual network."
value = element(coalescelist(azurerm_virtual_network.vnet.*.address_space, [""]), 0)
}
output "subnet_ids" {
description = "List of IDs of subnets"
value = flatten(concat([for s in azurerm_subnet.snet : s.id], [var.gateway_subnet_address_prefix != null ? azurerm_subnet.gw_snet.0.id : null], [var.firewall_subnet_address_prefix != null ? azurerm_subnet.fw-snet.0.id : null]))
}
output "subnet_address_prefixes" {
description = "List of address prefix for subnets"
value = flatten(concat([for s in azurerm_subnet.snet : s.address_prefix], [var.gateway_subnet_address_prefix != null ? azurerm_subnet.gw_snet.0.address_prefixes : null], [var.firewall_subnet_address_prefix != null ? azurerm_subnet.fw-snet.0.address_prefixes : null]))
}
output "network_security_group_ids" {
description = "List of Network security groups and ids"
value = [for n in azurerm_network_security_group.nsg : n.id]
}
output "ddos_protection_plan" {
description = "Ddos protection plan details"
value = var.create_ddos_plan ? element(concat(azurerm_network_ddos_protection_plan.ddos.*.id, [""]), 0) : null
}
output "network_watcher_id" {
description = "ID of Network Watcher"
value = var.create_network_watcher != false ? element(concat(azurerm_network_watcher.nwatcher.*.id, [""]), 0) : null
}