2021-08-06 18:36:38 +03:00
|
|
|
# The following locals are used to build the map of Resource
|
|
|
|
# Groups to deploy.
|
|
|
|
locals {
|
|
|
|
azurerm_resource_group_connectivity = {
|
2022-03-09 17:16:09 +03:00
|
|
|
for resource in module.connectivity_resources.configuration.azurerm_resource_group :
|
2021-08-06 18:36:38 +03:00
|
|
|
resource.resource_id => resource
|
2022-03-09 17:16:09 +03:00
|
|
|
if resource.managed_by_module &&
|
|
|
|
contains(["connectivity", "ddos", "dns"], resource.scope)
|
2021-08-06 18:36:38 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# The following locals are used to build the map of Virtual
|
|
|
|
# Networks to deploy.
|
|
|
|
locals {
|
|
|
|
azurerm_virtual_network_connectivity = {
|
2022-03-09 17:16:09 +03:00
|
|
|
for resource in module.connectivity_resources.configuration.azurerm_virtual_network :
|
2021-08-06 18:36:38 +03:00
|
|
|
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 = {
|
2022-03-09 17:16:09 +03:00
|
|
|
for resource in module.connectivity_resources.configuration.azurerm_subnet :
|
2021-08-06 18:36:38 +03:00
|
|
|
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 = {
|
2022-03-09 17:16:09 +03:00
|
|
|
for resource in module.connectivity_resources.configuration.azurerm_virtual_network_gateway :
|
2021-08-06 18:36:38 +03:00
|
|
|
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 = {
|
2022-03-09 17:16:09 +03:00
|
|
|
for resource in module.connectivity_resources.configuration.azurerm_public_ip :
|
2021-08-06 18:36:38 +03:00
|
|
|
resource.resource_id => resource
|
|
|
|
if resource.managed_by_module
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-04-14 21:22:00 +03:00
|
|
|
# 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"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-08-06 18:36:38 +03:00
|
|
|
# The following locals are used to build the map of Azure
|
|
|
|
# Firewalls to deploy.
|
|
|
|
locals {
|
|
|
|
azurerm_firewall_connectivity = {
|
2022-03-09 17:16:09 +03:00
|
|
|
for resource in module.connectivity_resources.configuration.azurerm_firewall :
|
2021-08-06 18:36:38 +03:00
|
|
|
resource.resource_id => resource
|
2022-03-09 17:16:09 +03:00
|
|
|
if resource.managed_by_module &&
|
|
|
|
resource.scope == "connectivity"
|
2021-08-06 18:36:38 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# The following locals are used to build the map of DDoS
|
|
|
|
# Protection Plans to deploy.
|
|
|
|
locals {
|
|
|
|
azurerm_network_ddos_protection_plan_connectivity = {
|
2022-03-09 17:16:09 +03:00
|
|
|
for resource in module.connectivity_resources.configuration.azurerm_network_ddos_protection_plan :
|
2021-08-06 18:36:38 +03:00
|
|
|
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 = {
|
2022-03-09 17:16:09 +03:00
|
|
|
for resource in module.connectivity_resources.configuration.azurerm_private_dns_zone :
|
2021-08-06 18:36:38 +03:00
|
|
|
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 = {
|
2022-03-09 17:16:09 +03:00
|
|
|
for resource in module.connectivity_resources.configuration.azurerm_dns_zone :
|
2021-08-06 18:36:38 +03:00
|
|
|
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 = {
|
2022-03-09 17:16:09 +03:00
|
|
|
for resource in module.connectivity_resources.configuration.azurerm_private_dns_zone_virtual_network_link :
|
2021-08-06 18:36:38 +03:00
|
|
|
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 = {
|
2022-03-09 17:16:09 +03:00
|
|
|
for resource in module.connectivity_resources.configuration.azurerm_virtual_network_peering :
|
2021-08-06 18:36:38 +03:00
|
|
|
resource.resource_id => resource
|
|
|
|
if resource.managed_by_module
|
|
|
|
}
|
|
|
|
}
|