feat: support port ranges in switch_port_configs (e.g. port_range = "1-24")
Replace port_id with port_range in variable; add local to expand ranges into individual port entries before creating meraki_switch_port resources. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
67420fc099
commit
775dbce9a8
@@ -33,12 +33,11 @@ switch_access_policies = [
|
||||
# switch_port_configs = [
|
||||
# {
|
||||
# serial = "XXXX-XXXX-XXXX" # serial del switch
|
||||
# port_id = "1"
|
||||
# name = "Workstation 1"
|
||||
# port_range = "1-24" # rango de puertos (o "1" para uno solo)
|
||||
# type = "access"
|
||||
# vlan = 100
|
||||
# access_policy_type = "Custom access policy"
|
||||
# access_policy_number = 1 # número de la política 802.1X-CORPO
|
||||
# access_policy_number = 1 # número de la política DOT1X-CORPO (id=1)
|
||||
# },
|
||||
# ]
|
||||
switch_port_configs = []
|
||||
|
||||
@@ -100,11 +100,10 @@ variable "switch_access_policies" {
|
||||
variable "switch_port_configs" {
|
||||
type = list(object({
|
||||
serial = string
|
||||
port_id = string
|
||||
port_range = string # puerto único "1" o rango "1-24"
|
||||
name = optional(string, "")
|
||||
type = optional(string, "access")
|
||||
vlan = optional(number, null)
|
||||
voice_vlan_id = optional(number, null)
|
||||
access_policy_type = optional(string, "Open")
|
||||
access_policy_number = optional(number, null)
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user