-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.tf
More file actions
110 lines (89 loc) · 2.79 KB
/
variables.tf
File metadata and controls
110 lines (89 loc) · 2.79 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
variable "size" {
description = "A predefined size (e.g., tiny, small). Mutually exclusive with 'slug'."
type = string
default = null
validation {
# Condition is true if size is null OR if it's a valid, non-null string
condition = var.size == null ? true : contains(["tiny", "small", "medium", "large"], var.size)
error_message = "The 'size' value must be one of: tiny, small, medium, large."
}
}
variable "environment" {
description = "Environment"
type = string
default = "dev"
}
variable "name" {
description = "Node name"
type = string
}
variable "image_id" {
description = "OS Image family"
type = string
default = "debian-12-genericcloud"
}
variable "ssh_username" {
description = "SSH username"
type = string
default = "ops"
}
variable "ssh_public_key_file" {
description = "SSH public key file"
type = string
default = "~/.ssh/id_ed25519.pub"
}
variable "ssh_key_fingerprint" {
description = "Admin SSH Key fingerprint (for compatibility with DO)"
type = string
default = null
}
variable "ssh_allow_passwords" {
description = "Allow password SSH login"
type = bool
default = false
}
variable "ssh_allow_root" {
description = "Allow root SSH login"
type = bool
default = false
}
variable "hashed_passwd" {
description = "Hash value (run: mkpasswd --method=SHA-512 --rounds=4096 )"
type = string
default = null
}
variable "all_inclusive" {
description = "include all extra packages for admin comfort"
type = bool
default = false
}
variable "low_cost" {
description = "Low cost instance (ignored for compatibility with other cloud modules)"
type = bool
default = false
}
variable "extra_disks" {
description = "Additional disks"
type = map(object({
size = number
type = string
}))
default = {}
}
variable "provider_opts" {
description = <<DESC
Hyper-V provider additional configuration parameters.
Object structure:
- `hyperv_path_prefix` (optional, string) - Base directory for Hyper-V virtual machines. Default: `c:\\vm`
- `hyperv_root_images` (optional, string) - Directory for base VHDX images. Default: `c:\\vm\\root-images`
- `hyperv_cloudinit_disks` (optional, string) - Directory for cloud-init ISO files. Default: `c:\\vm\\cloud-init-iso`
- `hyperv_network_switch_name` (optional, string) - Hyper-V virtual switch name. Default: `Default Switch`
DESC
type = object({
hyperv_path_prefix = optional(string, "c:\\vm")
hyperv_root_images = optional(string, "c:\\vm\\root-images")
hyperv_cloudinit_disks = optional(string, "c:\\vm\\cloud-init-iso")
hyperv_network_switch_name = optional(string, "Default Switch")
})
default = {}
}