-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.tf
More file actions
139 lines (125 loc) · 3.61 KB
/
Copy pathvariables.tf
File metadata and controls
139 lines (125 loc) · 3.61 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
variable "organization_id" {
type = string
description = "The ID of the organization to create the network in"
validation {
condition = length(var.organization_id) > 0
error_message = "Organization ID must be provided"
}
}
variable "network_name" {
type = string
description = "The name of the network to create"
default = "City_ST"
}
variable "network_description" {
type = string
description = "The description of the network to create"
default = ""
}
variable "emm_network" {
type = bool
description = "Whether the network is an EMM network"
default = false
validation {
condition = var.emm_network == true ? var.vlans_enabled == false : true
error_message = "VLANs must be disabled for EMM networks"
}
}
variable "time_zone" {
type = string
description = "The time zone of the network to create"
default = "America/New_York"
}
variable "product_types" {
type = list(string)
description = "The product types of the network to create"
default = ["appliance", "switch", "wireless"]
validation {
condition = length(var.product_types) > 0
error_message = "At least one product type must be provided"
}
}
variable "network_tags" {
type = list(string)
description = "The tags of the network to create"
default = ["managed_by_tofu"]
}
variable "vlans_enabled" {
type = bool
description = "Whether to enable VLANs for the network"
default = false
}
variable "webhooks" {
type = map(object({
name = string
url = string
payload_template_name = string
payload_template_payload_template_id = string
shared_secret = string
}))
default = {}
}
variable "syslog_servers" {
type = map(object({
host = string
port = number
protocol = optional(string, "UDP")
roles = list(string)
}))
default = {}
}
variable "gateway" {
type = object({
serial = string
address = optional(string, "")
latitude = optional(number, 0)
longitude = optional(number, 0)
move_map_marker = optional(bool, false)
name = optional(string, "")
notes = optional(string, "")
tags = optional(list(string), ["managed_by_tofu"])
})
description = "The gateway configuration for the network"
default = {
serial = ""
address = ""
latitude = 0
longitude = 0
move_map_marker = false
name = ""
notes = ""
tags = ["managed_by_tofu"]
}
}
variable "switches" {
type = map(object({
serial = string
address = optional(string, "")
latitude = optional(number, 0)
longitude = optional(number, 0)
move_map_marker = optional(bool, false)
notes = optional(string, "")
tags = optional(list(string), ["managed_by_tofu"])
}))
description = "Switches keyed by device name"
default = {}
}
variable "access_points" {
type = map(object({
serial = string
address = optional(string, "")
latitude = optional(number, 0)
longitude = optional(number, 0)
move_map_marker = optional(bool, false)
notes = optional(string, "")
tags = optional(list(string), ["managed_by_tofu"])
}))
description = "Access points keyed by device name"
default = {}
}
variable "switch_stacks" {
type = map(object({
switch_keys = list(string)
}))
default = {}
}