-
Notifications
You must be signed in to change notification settings - Fork 0
/
map_variables.tf
79 lines (73 loc) · 1.6 KB
/
map_variables.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
locals {
a_records_map = merge(
{ for i in flatten([
for name, targets in var.a_records : [
for target in flatten([targets]) : {
name : name
target : target
proxied : false
}
]
]) :
"${i.name}::${i.target}" => i
},
{ for i in flatten([
for name, targets in var.proxied_a_records : [
for target in flatten([targets]) : {
name : name
target : target
proxied : true
}
]
]) :
"${i.name}::${i.target}" => i
},
)
ns_records_map = { for i in flatten([
for name, targets in var.ns_records : [
for target in flatten([targets]) : {
name : name
target : target
}
]
]) :
"${i.name}::${i.target}" => i
}
txt_records_map = { for i in flatten([
for name, targets in var.txt_records : [
for target in flatten([targets]) : {
name : name
target : target
}
]
]) :
"${i.name}::${i.target}" => i
}
cname_records_map = merge(
{ for i in flatten([
for target, names in var.cnames_many_to_one : [
for name in flatten([names]) : {
name : name
target : target
proxied : false
}
]
]) :
"${i.name}" => i
},
{ for name, target in var.cname_records :
"${name}" => {
name : name
target : target
proxied : false
}
},
{ for name, target in var.proxied_cname_records :
"${name}" => {
name : name
target : target
proxied : true
}
},
)
}