-
Notifications
You must be signed in to change notification settings - Fork 1
/
root_variables.tf
128 lines (119 loc) · 3.37 KB
/
root_variables.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
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
variable "org_id" { # Mandatory
type = string
description = "Target Juniper Mist organization ID for all automation operations"
validation {
condition = can(regex("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", var.org_id)) # Must have UUID length and structure
error_message = "Not a valid string for Mist org's ID"
}
}
variable "name-prefix" {
type = string
description = "A name prefix for resource naming. Please note that some names inside nested variables will have explicit names only."
}
variable "sites" { # Mandatory
type = map(object({
role = string
name = string
country_code = string
timezone = string
address = string
notes = string
latlng = map(number)
vars = map(string)
wan_devices = list(string)
switch_devices = list(string)
}))
description = "Definition of the sites to be deployed"
}
variable "root_password" {
type = string
sensitive = true
description = "Root password for WAN Edges. Note that root password for switches has to be provided explicitly inside switch template variable."
}
variable "networks" {
type = map(object({
name = string
subnet = string
vlan_id = any
disallow_mist_services = bool
tenants = optional(map(object({
addresses = list(string)
})))
vpn_access = object({
OrgOverlay = object({
routed = bool
no_readvertise_to_overlay = bool
no_readvertise_to_lan_bgp = bool
no_readvertise_to_lan_ospf = bool
})
})
}))
description = "Org level WAN networks to be created"
}
variable "services" {
type = map(object({
name = string
type = string
addresses = list(string)
apps = list(string)
specs = list(object({
protocol = string
port_range = string
}))
traffic_type = string
}))
description = "Org level WAN services (applications) to be created"
}
variable "hub_profiles" {
type = map(object({
name = string
port_config = any
ip_configs = map(object({
type = string
ip = string
netmask = string
}))
path_preferences = any
service_policies = any
routing_policies = any
bgp_config = any
}))
description = "Device profiles definitions to be applied to WAN Edge hub devices"
}
variable "edge_template" {
type = map(object({
name = string
type = string
port_config = any
ip_configs = map(object({
type = string
ip = string
netmask = string
}))
dhcpd_config = any
path_preferences = any
service_policies = any
}))
description = "Edge templates to be applied to sites with WAN Edge spoke devices"
}
variable "switch_template" {
type = map(object({
name = string
switch_mgmt = any
networks = any
port_usages = any
# disabled_system_defined_port_usages = any
switch_matching = any
}))
description = "Org level network templates for switches"
}
variable "inventory" {
type = map(object({
name = string
type = string
hub_device_profile = string
site_id = string
unclaim_when_destroyed = bool
}))
description = "Definition of all devices (WAN gateways – hubs and spokes, and switches)"
}