2023-12-15 04:36:58 -05:00
|
|
|
variable "base_name" {
|
|
|
|
type = string
|
|
|
|
description = "Name prefix fort the cluster's VMs."
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "node_group_name" {
|
|
|
|
type = string
|
|
|
|
description = "Constellation name for the node group (used for configuration and CSP-independent naming)."
|
|
|
|
}
|
|
|
|
|
2022-05-22 09:39:30 -04:00
|
|
|
variable "amount" {
|
|
|
|
type = number
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "Amount of nodes."
|
2022-05-22 09:39:30 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "vcpus" {
|
|
|
|
type = number
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "Amount of vCPUs per instance."
|
2022-05-22 09:39:30 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "memory" {
|
|
|
|
type = number
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "Amount of memory per instance (MiB)."
|
2022-05-22 09:39:30 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "state_disk_size" {
|
|
|
|
type = number
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "Disk size for the state disk of the nodes [GB]."
|
2022-05-22 09:39:30 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "cidr" {
|
|
|
|
type = string
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "Subnet to use for DHCP."
|
2022-05-22 09:39:30 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "network_id" {
|
|
|
|
type = string
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "ID of the Libvirt network to use."
|
2022-05-22 09:39:30 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "pool" {
|
|
|
|
type = string
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "Name of the Libvirt storage pool to use."
|
2022-05-22 09:39:30 -04:00
|
|
|
}
|
|
|
|
|
2023-05-16 08:13:10 -04:00
|
|
|
variable "boot_mode" {
|
|
|
|
type = string
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "Boot mode. Can be 'uefi' or 'direct-linux-boot'"
|
2023-05-16 08:13:10 -04:00
|
|
|
validation {
|
|
|
|
condition = can(regex("^(uefi|direct-linux-boot)$", var.boot_mode))
|
|
|
|
error_message = "boot_mode must be 'uefi' or 'direct-linux-boot'"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-05-22 09:39:30 -04:00
|
|
|
variable "boot_volume_id" {
|
|
|
|
type = string
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "ID of the Constellation boot disk."
|
2022-05-22 09:39:30 -04:00
|
|
|
}
|
|
|
|
|
2023-05-16 08:13:10 -04:00
|
|
|
variable "kernel_volume_id" {
|
|
|
|
type = string
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "ID of the Constellation kernel volume."
|
2023-05-16 08:13:10 -04:00
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "initrd_volume_id" {
|
|
|
|
type = string
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "ID of the constellation initrd volume."
|
2023-05-16 08:13:10 -04:00
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "kernel_cmdline" {
|
|
|
|
type = string
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "Kernel cmdline."
|
2023-05-16 08:13:10 -04:00
|
|
|
default = ""
|
|
|
|
}
|
|
|
|
|
2022-05-22 09:39:30 -04:00
|
|
|
variable "role" {
|
2022-05-30 04:29:34 -04:00
|
|
|
type = string
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "Role of the node in the Constellation cluster. Can either be'control-plane' or 'worker'."
|
2022-05-30 04:29:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "machine" {
|
|
|
|
type = string
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "Machine type. Use 'q35' for secure boot and 'pc' for non secure boot. See 'qemu-system-x86_64 -machine help'."
|
2022-05-22 09:39:30 -04:00
|
|
|
}
|
2022-09-26 09:52:31 -04:00
|
|
|
|
2022-10-19 07:10:15 -04:00
|
|
|
variable "firmware" {
|
|
|
|
type = string
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "Path to UEFI firmware file. Ignored for direct-linux-boot."
|
2022-10-19 07:10:15 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "nvram" {
|
|
|
|
type = string
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "Path to UEFI NVRAM template file. Used for secure boot."
|
2023-06-28 08:42:34 -04:00
|
|
|
}
|