-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
86 lines (77 loc) · 2.25 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
variable "cluster_name" {
type = string
description = "Cluster name to identify it in infrastructure."
}
variable "location" {
type = string
description = "Location where the cluster is hosted."
}
variable "network_name" {
type = string
description = "Name of the vSphere distribute network. Defaults to `vds-{var.name}`."
default = null
}
variable "network_vlan_id" {
type = string
description = "VLAN ID of the vSphere distribute network."
default = null
}
variable "datacenter_name" {
type = string
description = "vSphere Datacenter in which to place the VM"
default = "Milton"
}
variable "vds_name" {
type = string
description = "vSphere VDS Name"
default = "vds-01"
}
variable "cluster_parameters" {
# !!IMPORTANT!!
# These are defaults when values have not been specified. Any changes
type = object({
name = optional(string)
domain = optional(string)
host_subnet = optional(string)
pod_subnet = optional(string)
service_subnet = optional(string)
api_domain = optional(string)
api_port = optional(string)
talos_version = optional(string)
kubernetes_version = optional(string)
})
description = "cluster parameters object"
default = {
name = "cluster-01"
domain = "cluster.local"
host_subnet = "192.168.1.0/24"
pod_subnet = "10.244.0.0/18"
service_subnet = "10.244.64.0/20"
api_domain = "milton.mcf.io"
api_port = "6443"
talos_version = "v1.4.7"
kubernetes_version = "v1.27.3"
}
}
variable "cluster_nodes" {
type = map(object({
cpus = optional(number)
memory = optional(number)
disk_size = optional(number)
machine_type = optional(string)
}))
description = "Map of virtual machines, cluster role and configurations"
default = {
default = {}
}
}
variable "content_library" {
type = string
description = "vSphere Content Library to look for the os-image iso/ova"
default = "os-images"
}
variable "talos_image" {
type = string
description = "Talos image to use for talos cluster"
default = "talos-latest"
}