From 6e2f0579ae57bee6f3181702c78236bf7abc3707 Mon Sep 17 00:00:00 2001 From: Marcin Parafiniuk Date: Mon, 2 Dec 2024 15:29:56 +0100 Subject: [PATCH] wireless ssid bonjour forwarding --- README.md | 1 + meraki_wireless.tf | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/README.md b/README.md index 80ea6f9..4284515 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,7 @@ module "meraki" { | [meraki_wireless_rf_profile.net_wireless_rf_profiles](https://registry.terraform.io/providers/CiscoDevNet/meraki/0.1.3/docs/resources/wireless_rf_profile) | resource | | [meraki_wireless_settings.net_wireless_settings](https://registry.terraform.io/providers/CiscoDevNet/meraki/0.1.3/docs/resources/wireless_settings) | resource | | [meraki_wireless_ssid.net_wireless_ssids](https://registry.terraform.io/providers/CiscoDevNet/meraki/0.1.3/docs/resources/wireless_ssid) | resource | +| [meraki_wireless_ssid_bonjour_forwarding.wireless_ssids_bonjour_forwarding](https://registry.terraform.io/providers/CiscoDevNet/meraki/0.1.3/docs/resources/wireless_ssid_bonjour_forwarding) | resource | | [meraki_wireless_ssid_device_type_group_policies.net_wireless_ssids_device_type_group_policies](https://registry.terraform.io/providers/CiscoDevNet/meraki/0.1.3/docs/resources/wireless_ssid_device_type_group_policies) | resource | | [meraki_wireless_ssid_eap_override.net_wireless_ssid_eap_override](https://registry.terraform.io/providers/CiscoDevNet/meraki/0.1.3/docs/resources/wireless_ssid_eap_override) | resource | | [meraki_wireless_ssid_hotspot_20.net_wireless_ssids_hotspot20](https://registry.terraform.io/providers/CiscoDevNet/meraki/0.1.3/docs/resources/wireless_ssid_hotspot_20) | resource | diff --git a/meraki_wireless.tf b/meraki_wireless.tf index 0be46aa..eafa322 100644 --- a/meraki_wireless.tf +++ b/meraki_wireless.tf @@ -522,6 +522,35 @@ resource "meraki_wireless_ssid_traffic_shaping_rules" "net_wireless_ssids_traffi } + +locals { + networks_wireless_ssids_bonjour_forwarding = flatten([ + + for domain in try(local.meraki.domains, []) : [ + for organization in try(domain.organizations, []) : [ + for network in try(organization.networks, []) : [ + for wireless_ssid in try(network.wireless_ssids, []) : { + network_id = meraki_network.network["${organization.name}/${network.name}"].id + number = local.wireless_ssids_map["${organization.name}/${network.name}/wireless_ssid/${wireless_ssid.name}"] + data = try(wireless_ssid.bonjour_forwarding, null) + } if try(wireless_ssid.bonjour_forwarding, null) != null + ] if try(organization.networks, null) != null + ] if try(domain.organizations, null) != null + ] if try(local.meraki.domains, null) != null + ]) +} + +resource "meraki_wireless_ssid_bonjour_forwarding" "wireless_ssids_bonjour_forwarding" { + for_each = { for i, v in local.networks_wireless_ssids_bonjour_forwarding : i => v } + network_id = each.value.network_id + number = each.value.number + + enabled = try(each.value.data.enabled, local.defaults.meraki.networks.networks_wireless_ssids_bonjour_forwarding.enabled, null) + rules = try(each.value.data.rules, local.defaults.meraki.networks.networks_wireless_ssids_bonjour_forwarding.rules, null) + exception_enabled = try(each.value.data.exception.enabled, local.defaults.meraki.networks.networks_wireless_ssids_bonjour_forwarding.exception.enabled, null) + +} + locals { networks_networks_wireless_alternate_management_interface = flatten([