-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathethernet_network.tf
32 lines (31 loc) · 1.19 KB
/
ethernet_network.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
#__________________________________________________________________
#
# Intersight Ethernet Network Policy
# GUI Location: Policies > Create Policy > Ethernet Network
#__________________________________________________________________
resource "intersight_vnic_eth_network_policy" "map" {
for_each = { for v in lookup(local.policies, "ethernet_network", []) : v.name => merge(local.defaults.ethernet_network, v, {
name = "${local.name_prefix.ethernet_network}${v.name}${local.name_suffix.ethernet_network}"
tags = lookup(v, "tags", var.policies.global_settings.tags)
}
) }
description = coalesce(each.value.description, "${each.value.name} Ethernet Network Policy.")
name = each.value.name
organization {
moid = local.orgs[local.organization]
object_type = "organization.Organization"
}
vlan_settings {
allowed_vlans = "" # CSCvx98712. This is no longer valid for the policy
default_vlan = each.value.default_vlan
mode = each.value.vlan_mode
object_type = "vnic.VlanSettings"
}
dynamic "tags" {
for_each = { for v in each.value.tags : v.key => v }
content {
key = tags.value.key
value = tags.value.value
}
}
}