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:
Jose Martinez
2026-03-18 11:37:11 +01:00
co-authored by Claude Sonnet 4.6
parent 67420fc099
commit 775dbce9a8
4 changed files with 29 additions and 11 deletions
+1 -2
View File
@@ -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)
}))