-
Notifications
You must be signed in to change notification settings - Fork 0
/
vars.tf
89 lines (73 loc) · 1.8 KB
/
vars.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
# Required
variable "node_count" {
type = number
description = "The number of identical VMs to create"
}
variable "network_id" {
type = string
description = "The libvirt_network ID for the hosts"
}
variable "ssh_public_key" {
type = string
description = "The public key for accessing "
}
# Optional
variable "ansible_playbook" {
type = string
description = "An optional string containing a playbook that will run on all hosts"
default = null
}
variable "base_image" {
type = string
description = "Cloud base image to use for the VMs"
default = "https://cdimage.debian.org/cdimage/cloud/bullseye/latest/debian-11-genericcloud-amd64.qcow2"
}
variable "cpu_count" {
type = number
description = "The number of vcpus for each VM"
default = 2
}
variable "ram_size" {
type = number
description = "The amount of RAM for each VM"
default = 2048 # 2GiB
}
variable "hostname_prefix" {
type = string
description = "Prefix for the VM names"
default = "node"
}
variable "os_disk_size" {
type = number
description = "The size of the OS disk for each VM"
default = 8590000128 # 8GiB
}
variable "data_volumes" {
type = map
description = "Configure data volumes for each VM"
default = {
count = 0
size = 1074000000 # 1GiB
}
}
variable "mac_addresses" {
description = "A list of mac addresses for the hosts"
type = list(string)
default = []
}
variable "extra_files" {
description = "Extra files to write to hosts"
default = []
type = list(
object({
hostname = string
path = string
owner = string
permissions = string
content = string
})
)
}
locals {
pool_name = var.hostname_prefix
}