2021-09-10 20:55:21 +00:00
|
|
|
variable "prefix" {
|
|
|
|
type = string
|
|
|
|
default = "kubespray"
|
|
|
|
|
|
|
|
description = "Prefix that is used to distinguish these resources from others"
|
|
|
|
}
|
2021-03-15 08:41:04 +00:00
|
|
|
|
|
|
|
variable "zone" {
|
|
|
|
description = "The zone where to run the cluster"
|
|
|
|
}
|
|
|
|
|
2021-09-10 20:55:21 +00:00
|
|
|
variable "template_name" {
|
|
|
|
description = "Block describing the preconfigured operating system"
|
2021-03-15 08:41:04 +00:00
|
|
|
}
|
|
|
|
|
2021-09-10 20:55:21 +00:00
|
|
|
variable "username" {
|
|
|
|
description = "The username to use for the nodes"
|
|
|
|
default = "ubuntu"
|
|
|
|
}
|
2021-03-15 08:41:04 +00:00
|
|
|
|
2021-09-10 20:55:21 +00:00
|
|
|
variable "private_network_cidr" {
|
|
|
|
description = "CIDR to use for the private network"
|
|
|
|
default = "172.16.0.0/24"
|
|
|
|
}
|
2021-03-15 08:41:04 +00:00
|
|
|
|
|
|
|
variable "machines" {
|
|
|
|
description = "Cluster machines"
|
2021-09-10 20:55:21 +00:00
|
|
|
|
2021-03-15 08:41:04 +00:00
|
|
|
type = map(object({
|
|
|
|
node_type = string
|
2022-05-11 17:15:03 +00:00
|
|
|
plan = string
|
2021-03-15 08:41:04 +00:00
|
|
|
cpu = string
|
|
|
|
mem = string
|
|
|
|
disk_size = number
|
2021-09-10 20:55:21 +00:00
|
|
|
additional_disks = map(object({
|
|
|
|
size = number
|
|
|
|
tier = string
|
|
|
|
}))
|
2021-03-15 08:41:04 +00:00
|
|
|
}))
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "ssh_public_keys" {
|
|
|
|
description = "List of public SSH keys which are injected into the VMs."
|
|
|
|
type = list(string)
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "inventory_file" {
|
|
|
|
description = "Where to store the generated inventory file"
|
|
|
|
}
|
|
|
|
|
2021-09-10 20:55:21 +00:00
|
|
|
variable "UPCLOUD_USERNAME" {
|
|
|
|
description = "UpCloud username with API access"
|
|
|
|
}
|
2021-03-15 08:41:04 +00:00
|
|
|
|
2021-09-10 20:55:21 +00:00
|
|
|
variable "UPCLOUD_PASSWORD" {
|
|
|
|
description = "Password for UpCloud API user"
|
|
|
|
}
|
2022-05-11 17:15:03 +00:00
|
|
|
|
|
|
|
variable "firewall_enabled" {
|
|
|
|
description = "Enable firewall rules"
|
|
|
|
default = false
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "master_allowed_remote_ips" {
|
|
|
|
description = "List of IP start/end addresses allowed to access API of masters"
|
|
|
|
type = list(object({
|
|
|
|
start_address = string
|
|
|
|
end_address = string
|
|
|
|
}))
|
|
|
|
default = []
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "k8s_allowed_remote_ips" {
|
|
|
|
description = "List of IP start/end addresses allowed to SSH to hosts"
|
|
|
|
type = list(object({
|
|
|
|
start_address = string
|
|
|
|
end_address = string
|
|
|
|
}))
|
|
|
|
default = []
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "loadbalancer_enabled" {
|
|
|
|
description = "Enable load balancer"
|
|
|
|
default = false
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "loadbalancer_plan" {
|
|
|
|
description = "Load balancer plan (development/production-small)"
|
|
|
|
default = "development"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "loadbalancers" {
|
|
|
|
description = "Load balancers"
|
|
|
|
|
|
|
|
type = map(object({
|
|
|
|
port = number
|
|
|
|
backend_servers = list(string)
|
|
|
|
}))
|
|
|
|
default = {}
|
|
|
|
}
|