-
Notifications
You must be signed in to change notification settings - Fork 2
/
locals-outputs.tf
29 lines (27 loc) · 1.66 KB
/
locals-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
locals {
inbound_endpoints_output = {
for endpoint_name in keys(local.inbound_endpoints) : endpoint_name => {
id = azurerm_private_dns_resolver_inbound_endpoint.main[endpoint_name].id
name = azurerm_private_dns_resolver_inbound_endpoint.main[endpoint_name].name
subnet_id = module.subnets[endpoint_name].id
subnet_name = module.subnets[endpoint_name].name
private_ip_address = azurerm_private_dns_resolver_inbound_endpoint.main[endpoint_name].ip_configurations[0].private_ip_address
}
}
outbound_endpoints_output = {
for endpoint_name in keys(local.outbound_endpoints) : endpoint_name => {
id = azurerm_private_dns_resolver_outbound_endpoint.main[endpoint_name].id
name = azurerm_private_dns_resolver_outbound_endpoint.main[endpoint_name].name
subnet_id = module.subnets[endpoint_name].id
subnet_name = module.subnets[endpoint_name].name
}
}
dns_forwarding_rulesets_output = {
for ruleset_name in keys(local.dns_forwarding_rulesets) : ruleset_name => {
id = azurerm_private_dns_resolver_dns_forwarding_ruleset.main[ruleset_name].id
name = azurerm_private_dns_resolver_dns_forwarding_ruleset.main[ruleset_name].name
rules_ids = [for rule in local.forwarding_rules : azurerm_private_dns_resolver_forwarding_rule.main[rule.name].id if rule.ruleset_name == ruleset_name]
virtual_network_links_ids = [for index, link in local.virtual_network_links_flattened : azurerm_private_dns_resolver_virtual_network_link.main[index].id if link.ruleset_name == ruleset_name]
}
}
}