-
Notifications
You must be signed in to change notification settings - Fork 0
/
domain.tf
119 lines (112 loc) · 5.69 KB
/
domain.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
#____________________________________________________________
#
# Intersight UCS Domain Profile Resource
# GUI Location: Profiles > UCS Domain Profile > Create
#____________________________________________________________
data "intersight_network_element_summary" "fis" {
for_each = { for s in local.domain_serial_numbers : s => s }
serial = each.value
}
resource "intersight_fabric_switch_cluster_profile" "map" {
depends_on = [
data.intersight_fabric_switch_cluster_profile_template.map,
intersight_fabric_switch_cluster_profile_template.map
]
for_each = { for k, v in local.domain : k => v }
additional_properties = jsonencode({
SrcTemplate = each.value.attach_template == true && each.value.detach_template == false && length(regexall("UNUSED", each.value.ucs_domain_profile_template)
) == 0 ? { Moid = local.ucs_templates.domain[each.value.ucs_domain_profile_template].moid, ObjectType = "fabric.SwitchClusterProfileTemplate" } : null
})
description = lookup(each.value, "description", "${each.value.name} Domain Profile.")
name = each.value.name
type = "instance"
user_label = each.value.user_label
organization { moid = var.orgs[each.value.org] }
dynamic "tags" {
for_each = { for v in each.value.tags : v.key => v }
content {
key = tags.value.key