mirror of
https://github.com/outbackdingo/terraform-libvirt-talos.git
synced 2026-01-27 10:20:31 +00:00
116 lines
3.1 KiB
HCL
116 lines
3.1 KiB
HCL
# see https://github.com/siderolabs/talos/releases
|
|
# see https://www.talos.dev/v1.10/introduction/support-matrix/
|
|
variable "talos_version" {
|
|
type = string
|
|
# renovate: datasource=github-releases depName=siderolabs/talos
|
|
default = "1.10.6"
|
|
validation {
|
|
condition = can(regex("^\\d+(\\.\\d+)+", var.talos_version))
|
|
error_message = "Must be a version number."
|
|
}
|
|
}
|
|
|
|
# see https://github.com/siderolabs/kubelet/pkgs/container/kubelet
|
|
# see https://www.talos.dev/v1.10/introduction/support-matrix/
|
|
variable "kubernetes_version" {
|
|
type = string
|
|
# renovate: datasource=github-releases depName=siderolabs/kubelet
|
|
default = "1.33.3"
|
|
validation {
|
|
condition = can(regex("^\\d+(\\.\\d+)+", var.kubernetes_version))
|
|
error_message = "Must be a version number."
|
|
}
|
|
}
|
|
|
|
variable "cluster_name" {
|
|
description = "A name to provide for the Talos cluster"
|
|
type = string
|
|
default = "example"
|
|
}
|
|
|
|
variable "cluster_vip" {
|
|
description = "The virtual IP (VIP) address of the Kubernetes API server. Ensure it is synchronized with the 'cluster_endpoint' variable."
|
|
type = string
|
|
default = "10.17.3.9"
|
|
}
|
|
|
|
variable "cluster_endpoint" {
|
|
description = "The virtual IP (VIP) endpoint of the Kubernetes API server. Ensure it is synchronized with the 'cluster_vip' variable."
|
|
type = string
|
|
default = "https://10.17.3.9:6443"
|
|
}
|
|
|
|
variable "cluster_node_network" {
|
|
description = "The IP network of the cluster nodes"
|
|
type = string
|
|
default = "10.17.3.0/24"
|
|
}
|
|
|
|
variable "cluster_node_network_first_controller_hostnum" {
|
|
description = "The hostnum of the first controller host"
|
|
type = number
|
|
default = 80
|
|
}
|
|
|
|
variable "cluster_node_network_first_worker_hostnum" {
|
|
description = "The hostnum of the first worker host"
|
|
type = number
|
|
default = 90
|
|
}
|
|
|
|
variable "cluster_node_network_load_balancer_first_hostnum" {
|
|
description = "The hostnum of the first load balancer host"
|
|
type = number
|
|
default = 130
|
|
}
|
|
|
|
variable "cluster_node_network_load_balancer_last_hostnum" {
|
|
description = "The hostnum of the last load balancer host"
|
|
type = number
|
|
default = 230
|
|
}
|
|
|
|
variable "cluster_node_domain" {
|
|
description = "the DNS domain of the cluster nodes"
|
|
type = string
|
|
default = "talos.test"
|
|
}
|
|
|
|
variable "ingress_domain" {
|
|
description = "the DNS domain of the ingress resources"
|
|
type = string
|
|
default = "example.test"
|
|
}
|
|
|
|
variable "controller_count" {
|
|
type = number
|
|
default = 1
|
|
validation {
|
|
condition = var.controller_count >= 1
|
|
error_message = "Must be 1 or more."
|
|
}
|
|
}
|
|
|
|
variable "worker_count" {
|
|
type = number
|
|
default = 1
|
|
validation {
|
|
condition = var.worker_count >= 1
|
|
error_message = "Must be 1 or more."
|
|
}
|
|
}
|
|
|
|
variable "talos_libvirt_base_volume_name" {
|
|
type = string
|
|
default = "talos-1.10.6.qcow2"
|
|
validation {
|
|
condition = can(regex(".+\\.qcow2+$", var.talos_libvirt_base_volume_name))
|
|
error_message = "Must be a name with a .qcow2 extension."
|
|
}
|
|
}
|
|
|
|
variable "prefix" {
|
|
type = string
|
|
default = "terraform_talos_example"
|
|
}
|