-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpools_mac.tf
60 lines (52 loc) · 1.34 KB
/
pools_mac.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
##
## Cisco suggests using MAC OUI of 00:25:B5
##
# This is a perfectly reasonable MAC pool. It's important to verify that the addresses in this pool
# are not configured in any other UCS Manager systems in the same environment. MAC addresses really
# should be globally unique in your infrastructure.
resource "intersight_macpool_pool" "cisco_af_1" {
name = "cisco_af_1"
dynamic "tags" {
for_each = local.tags
content {
key = tags.key
value = tags.value
}
}
organization {
moid = local.organization
}
mac_blocks {
from = "00:25:B5:AF:10:00"
size = 1000
}
lifecycle {
ignore_changes = [mac_blocks]
}
}
# Perhaps you want a MUCH larger MAC pool because you are using one Intersight instance to configure
# a large number of servers at many sites. This resource uses a dynamic block to add 16 pools to the
# policy with 1000 addresses in each block.
resource "intersight_macpool_pool" "cisco_0F" {
name = "cisco_0f"
dynamic "tags" {
for_each = local.tags
content {
key = tags.key
value = tags.value
}
}
organization {
moid = local.organization
}
dynamic "mac_blocks" {
for_each = formatlist("%X", range(0, 16))
content {
from = "00:25:B5:0F:${mac_blocks.value}0:00"
size = 1000
}
}
lifecycle {
ignore_changes = [mac_blocks]
}
}