forked from Azure/terraform-azurerm-caf-enterprise-scale
-
Notifications
You must be signed in to change notification settings - Fork 0
/
locals.connectivity.tf
122 lines (111 loc) · 3.76 KB
/
locals.connectivity.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# The following locals are used to build the map of Resource
# Groups to deploy.
locals {
azurerm_resource_group_connectivity = {
for resource in module.connectivity_resources.configuration.azurerm_resource_group :
resource.resource_id => resource
if resource.managed_by_module &&
contains(["connectivity", "ddos", "dns"], resource.scope)
}
}
# The following locals are used to build the map of Virtual
# Networks to deploy.
locals {
azurerm_virtual_network_connectivity = {
for resource in module.connectivity_resources.configuration.azurerm_virtual_network :
resource.resource_id => resource
if resource.managed_by_module
}
}
# The following locals are used to build the map of Subnets
# to deploy.
locals {
azurerm_subnet_connectivity = {
for resource in module.connectivity_resources.configuration.azurerm_subnet :
resource.resource_id => resource
if resource.managed_by_module
}
}
# The following locals are used to build the map of Virtual
# Network Gateways to deploy.
locals {
azurerm_virtual_network_gateway_connectivity = {
for resource in module.connectivity_resources.configuration.azurerm_virtual_network_gateway :
resource.resource_id => resource
if resource.managed_by_module
}
}
# The following locals are used to build the map of Public
# IPs to deploy.
locals {
azurerm_public_ip_connectivity = {
for resource in module.connectivity_resources.configuration.azurerm_public_ip :
resource.resource_id => resource
if resource.managed_by_module
}
}
# The following locals are used to build the map of Azure
# Firewall Policies to deploy.
locals {
azurerm_firewall_policy_connectivity = {
for resource in module.connectivity_resources.configuration.azurerm_firewall_policy :
resource.resource_id => resource
if resource.managed_by_module &&
resource.scope == "connectivity"
}
}
# The following locals are used to build the map of Azure
# Firewalls to deploy.
locals {
azurerm_firewall_connectivity = {
for resource in module.connectivity_resources.configuration.azurerm_firewall :
resource.resource_id => resource
if resource.managed_by_module &&
resource.scope == "connectivity"
}
}
# The following locals are used to build the map of DDoS
# Protection Plans to deploy.
locals {
azurerm_network_ddos_protection_plan_connectivity = {
for resource in module.connectivity_resources.configuration.azurerm_network_ddos_protection_plan :
resource.resource_id => resource
if resource.managed_by_module
}
}
# The following locals are used to build the map of Private DNS
# Zones to deploy.
locals {
azurerm_private_dns_zone_connectivity = {
for resource in module.connectivity_resources.configuration.azurerm_private_dns_zone :
resource.resource_id => resource
if resource.managed_by_module
}
}
# The following locals are used to build the map of Public DNS
# Zones to deploy.
locals {
azurerm_dns_zone_connectivity = {
for resource in module.connectivity_resources.configuration.azurerm_dns_zone :
resource.resource_id => resource
if resource.managed_by_module
}
}
# The following locals are used to build the map of Private DNS Zone
# Virtual Network Links to deploy.
locals {
azurerm_private_dns_zone_virtual_network_link_connectivity = {
for resource in module.connectivity_resources.configuration.azurerm_private_dns_zone_virtual_network_link :
resource.resource_id => resource
if resource.managed_by_module
}
}
# The following locals are used to build the map of Virtual
# Network Peerings to deploy.
locals {
azurerm_virtual_network_peering_connectivity = {
for resource in module.connectivity_resources.configuration.azurerm_virtual_network_peering :
resource.resource_id => resource
if resource.managed_by_module
}
}