2022-09-26 08:11:52 -04:00
|
|
|
variable "name" {
|
|
|
|
type = string
|
|
|
|
default = "constell"
|
|
|
|
description = "Base name of the cluster."
|
|
|
|
}
|
|
|
|
|
2023-06-19 07:02:01 -04:00
|
|
|
variable "node_groups" {
|
|
|
|
type = map(object({
|
|
|
|
role = string
|
|
|
|
zone = string
|
|
|
|
instance_type = string
|
|
|
|
disk_size = number
|
|
|
|
disk_type = string
|
|
|
|
initial_count = number
|
|
|
|
}))
|
|
|
|
description = "A map of node group names to node group configurations."
|
2023-06-23 06:08:30 -04:00
|
|
|
validation {
|
|
|
|
condition = can([for group in var.node_groups : group.role == "control-plane" || group.role == "worker"])
|
|
|
|
error_message = "The role has to be 'control-plane' or 'worker'."
|
|
|
|
}
|
2022-09-27 03:22:29 -04:00
|
|
|
}
|
|
|
|
|
2022-09-26 08:11:52 -04:00
|
|
|
variable "project" {
|
|
|
|
type = string
|
|
|
|
description = "The GCP project to deploy the cluster in."
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "region" {
|
|
|
|
type = string
|
|
|
|
description = "The GCP region to deploy the cluster in."
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "zone" {
|
|
|
|
type = string
|
|
|
|
description = "The GCP zone to deploy the cluster in."
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "image_id" {
|
|
|
|
type = string
|
|
|
|
description = "The GCP image to use for the cluster nodes."
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "debug" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
description = "Enable debug mode. This opens up a debugd port that can be used to deploy a custom bootstrapper."
|
|
|
|
}
|
2023-07-21 10:43:51 -04:00
|
|
|
|
|
|
|
variable "custom_endpoint" {
|
|
|
|
type = string
|
|
|
|
default = ""
|
|
|
|
description = "Custom endpoint to use for the Kubernetes apiserver. If not set, the default endpoint will be used."
|
|
|
|
}
|
2023-10-17 09:46:15 -04:00
|
|
|
|
|
|
|
variable "internal_load_balancer" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
|
|
|
description = "Enable internal load balancer. This can only be enabled if the control-plane is deployed in one zone."
|
|
|
|
}
|