generated from equinix-labs/terraform-equinix-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
variables.tf
154 lines (140 loc) · 3.73 KB
/
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# Variables for ALL modules
variable "metal_auth_token" {
description = "Equinix Metal user api token."
type = string
sensitive = true
}
variable "metal_project_id" {
description = "Project ID"
type = string
default = ""
}
variable "metal_organization_id" {
type = string
description = "Equinix Metal organization id"
}
variable "metal_tags" {
description = "String list of common tags for Equinix resources"
type = list(string)
default = ["terraform", "equinix-labs"]
}
variable "metal_metro" {
type = string
description = "Equinix Metal metro"
default = "sv"
}
# Variables for "workshop setup" module
variable "enable_workshop_setup" {
type = bool
description = "Enable Workshop Setup module"
default = false
}
# Variables for "metal" module
variable "enable_metal" {
type = bool
description = "Enable Metal module"
default = false
}
variable "metal_config" {
description = "Configuration for Metal module"
type = object({
device_count = number
os = string
billing_cycle = string
cluster_name = string
device_type = string
})
default = {
device_count = 3
os = "ubuntu_20_04"
billing_cycle = "hourly"
cluster_name = "metal-cluster"
device_type = "m3.small.x86"
}
}
# Variables for "eksa" module
variable "enable_eksa" {
type = bool
description = "Enable EKSA module"
default = false
}
variable "eksa_config" {
description = "Module configuration for EKSA module"
type = object({
cluster_name = string
cp_device_count = number
worker_device_count = number
})
default = {
cluster_name = "equinix-labs-cluster"
cp_device_count = 3
worker_device_count = 3
}
}
# Variables for "K3s" module
variable "global_ip" {
type = bool
description = "Enables a global anycast IPv4 that will be shared for all clusters in all metros"
default = false
}
variable "enable_k3s" {
type = bool
description = "Enable K3s module"
default = false
}
variable "k3s_config" {
description = "Module configuration for K3s module"
type = list(object({
name = string
metro = string
plan_control_plane = string
plan_node = string
node_count = number
k3s_ha = bool
os = string
control_plane_hostnames = string
node_hostnames = string
custom_k3s_token = string
ip_pool_count = number
k3s_version = string
metallb_version = string
}))
default = [{
name = "k3s-cluster"
metro = "SV"
plan_control_plane = "c3.small.x86"
plan_node = "c3.small.x86"
node_count = 3
k3s_ha = true
os = "debian_11"
control_plane_hostnames = "k3s-cp"
node_hostnames = "k3s-node"
custom_k3s_token = ""
ip_pool_count = 1
k3s_version = ""
metallb_version = ""
}]
}
# Variables for "k8s" module
variable "enable_k8s" {
type = bool
description = "Enable k8s module"
default = false
}
variable "k8s_config" {
description = "Module configuration for k8s module"
type = object({
kube_vip_version = string
kubernetes_version = string
ssh_private_key_path = string
cp_ha = bool
worker_host_count = number
})
default = {
kube_vip_version = "v0.6.2"
kubernetes_version = "v1.27.5"
ssh_private_key_path = ""
cp_ha = true
worker_host_count = 1
}
}