-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
variables.tf
150 lines (125 loc) · 3.32 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
variable "harvester_kubeconfig_path" {
description = "Path to the kubeconfig file"
type = string
}
variable "cluster_network_name" {
description = "Cluster network name"
type = string
}
variable "network_vlan_id" {
description = "VLAN ID for the network"
type = string
}
variable "network_name" {
description = "Name of the network"
type = string
}
variable "network_namespace" {
description = "Namespace of the network"
type = string
default = "default"
}
variable "network_route_mode" {
description = "Route mode for the network"
type = string
default = "manual"
}
variable "network_route_cidr" {
description = "CIDR for the network"
type = string
validation {
condition = var.network_route_cidr != ""
error_message = "network_route_cidr must be provided if network_route_mode is set to auto"
}
}
variable "network_route_gateway" {
description = "Gateway for the network"
type = string
validation {
condition = var.network_route_gateway != ""
error_message = "network_route_gateway must be provided if network_route_mode is set to auto"
}
}
variable "image_name" {
description = "The name of the OS image"
type = string
}
variable "image_namespace" {
description = "The namespace where the image will reside"
type = string
default = "default"
}
variable "image_display_name" {
description = "The display name for the OS image"
type = string
}
variable "image_source_type" {
description = "Source type for the image (e.g., download, upload)"
type = string
validation {
condition = var.image_source_type == "download" || var.image_source_type == "upload"
error_message = "The source_type can only be 'download' or 'upload'."
}
}
variable "image_url" {
description = "URL from where the image will be downloaded"
type = string
}
variable "image_tags" {
description = "Tags associated with the image"
type = map(string)
default = {}
}
# Variables for harvester_vm module
variable "vm_name" {
description = "Name of the virtual machine"
type = string
}
variable "vm_hostname" {
description = "Hostname for the virtual machine"
type = string
}
variable "vm_namespace" {
description = "Namespace where the VM will reside"
type = string
default = "default"
}
variable "vm_description" {
description = "Description for the VM"
type = string
}
variable "vm_tags" {
description = "Tags associated with the VM"
type = map(string)
default = {}
}
variable "vm_cpus" {
description = "Number of CPUs for the VM"
type = number
}
variable "vm_memory" {
description = "Memory allocation for the VM"
type = string
}
variable "vm_disks" {
description = "List of disks for the VM"
type = list(object({
name = string
type = optional(string)
size = optional(string)
bus = optional(string)
boot_order = optional(number)
auto_delete = optional(bool)
}))
default = []
}
variable "user_data" {
description = "User data for cloud-init configuration"
type = string
default = ""
}
variable "network_data" {
description = "Network data for cloud-init configuration"
type = string
default = ""
}