Skip to content

Commit 8efdc5e

Browse files
committed
wip
1 parent 717d52a commit 8efdc5e

3 files changed

Lines changed: 57 additions & 51 deletions

File tree

infrastructure/terraform/hub/dns_private.tf

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -82,41 +82,41 @@ locals {
8282
Private DNS A Records for APIM and Application Gateway
8383
--------------------------------------------------------------------------------------------------*/
8484

85-
locals {
86-
apim_private_custom_domains = ["gateway", "portal", "scm"]
87-
appgw_private_listener_hostnames = ["api"]
88-
89-
private_dns_a_records_obj_list = flatten([
90-
for region in keys(var.regions) : [
91-
[
92-
for hostname in local.apim_private_custom_domains : {
93-
region = region
94-
name = hostname
95-
records = module.api-management[region].private_ip_addresses
96-
}
97-
],
98-
[
99-
for hostname in local.appgw_private_listener_hostnames : {
100-
region = region
101-
name = hostname
102-
records = [local.appgw_config[region].frontend_ip_configuration.private.private_ip_address]
103-
}
104-
]
105-
]
106-
])
107-
private_dns_a_records_map = { for obj in local.private_dns_a_records_obj_list : "${obj.region}-${obj.name}" => obj }
108-
}
85+
# locals {
86+
# apim_private_custom_domains = ["gateway", "portal", "scm"]
87+
# appgw_private_listener_hostnames = ["api"]
88+
89+
# private_dns_a_records_obj_list = flatten([
90+
# for region in keys(var.regions) : [
91+
# [
92+
# for hostname in local.apim_private_custom_domains : {
93+
# region = region
94+
# name = hostname
95+
# records = module.api-management[region].private_ip_addresses
96+
# }
97+
# ],
98+
# [
99+
# for hostname in local.appgw_private_listener_hostnames : {
100+
# region = region
101+
# name = hostname
102+
# records = [local.appgw_config[region].frontend_ip_configuration.private.private_ip_address]
103+
# }
104+
# ]
105+
# ]
106+
# ])
107+
# private_dns_a_records_map = { for obj in local.private_dns_a_records_obj_list : "${obj.region}-${obj.name}" => obj }
108+
# }
109109

110-
module "private-dns-a-records" {
111-
for_each = local.private_dns_a_records_map
110+
# module "private-dns-a-records" {
111+
# for_each = local.private_dns_a_records_map
112112

113-
source = "../../../../dtos-devops-templates/infrastructure/modules/private-dns-a-record"
113+
# source = "../../../../dtos-devops-templates/infrastructure/modules/private-dns-a-record"
114114

115-
name = each.value.name
116-
resource_group_name = resource.azurerm_resource_group.private_dns_rg[each.value.region].name
117-
zone_name = var.dns_zone_name_private.nationalscreening
118-
ttl = 300
119-
records = each.value.records
115+
# name = each.value.name
116+
# resource_group_name = resource.azurerm_resource_group.private_dns_rg[each.value.region].name
117+
# zone_name = var.dns_zone_name_private.nationalscreening
118+
# ttl = 300
119+
# records = each.value.records
120120

121-
tags = var.tags
122-
}
121+
# tags = var.tags
122+
# }

infrastructure/terraform/hub/dns_public.tf

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22
Application Gateway Public DNS A Records
33
--------------------------------------------------------------------------------------------------*/
44

5-
locals {
6-
appgw_public_listener_hostnames = [
7-
for listener in local.appgw_config[local.primary_region].http_listener :
8-
listener.host_name if listener.frontend_ip_configuration_key == "public"
9-
]
10-
}
5+
# locals {
6+
# appgw_public_listener_hostnames = [
7+
# for listener in local.appgw_config[local.primary_region].http_listener :
8+
# listener.host_name if listener.frontend_ip_configuration_key == "public"
9+
# ]
10+
# }
1111

12-
module "appgw-dns-a-records" {
13-
# No region loop since public DNS is global. Traffic Manager will be required if an additional region is added.
14-
for_each = toset(local.appgw_public_listener_hostnames)
12+
# module "appgw-dns-a-records" {
13+
# # No region loop since public DNS is global. Traffic Manager will be required if an additional region is added.
14+
# for_each = toset(local.appgw_public_listener_hostnames)
1515

16-
source = "../../../../dtos-devops-templates/infrastructure/modules/dns-a-record"
16+
# source = "../../../../dtos-devops-templates/infrastructure/modules/dns-a-record"
1717

18-
name = split(".", each.key)[0]
19-
resource_group_name = var.dns_zone_rg_name_public
20-
zone_name = replace(each.key, "${split(".", each.key)[0]}.", "")
21-
ttl = 300
22-
target_resource_id = module.application-gateway-pip[local.primary_region].id
18+
# name = split(".", each.key)[0]
19+
# resource_group_name = var.dns_zone_rg_name_public
20+
# zone_name = replace(each.key, "${split(".", each.key)[0]}.", "")
21+
# ttl = 300
22+
# target_resource_id = module.application-gateway-pip[local.primary_region].id
2323

24-
tags = var.tags
25-
}
24+
# tags = var.tags
25+
# }
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
resource "azurerm_resource_group" "rg_hub" {
2+
for_each = var.regions
3+
4+
name = "${module.config[each.key].names.resource-group}-${var.application}-networking"
5+
location = each.key
6+
}

0 commit comments

Comments
 (0)