2023-12-15 04:36:58 -05:00
|
|
|
# Variables common to all CSPs
|
|
|
|
|
2022-09-26 08:11:52 -04:00
|
|
|
variable "name" {
|
|
|
|
type = string
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "Name of the Constellation cluster."
|
2022-09-26 08:11:52 -04:00
|
|
|
}
|
|
|
|
|
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 "image_id" {
|
|
|
|
type = string
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "OS image reference for the cluster's nodes."
|
2022-09-26 08:11:52 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "debug" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "DO NOT USE IN PRODUCTION. Enable debug mode. This opens up a debugd port that can be used to deploy a custom bootstrapper."
|
2022-09-26 08:11:52 -04:00
|
|
|
}
|
2023-07-21 10:43:51 -04:00
|
|
|
|
|
|
|
variable "custom_endpoint" {
|
|
|
|
type = string
|
|
|
|
default = ""
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "Custom endpoint to use for the Kubernetes API server. If not set, the default endpoint will be used."
|
2023-07-21 10:43:51 -04:00
|
|
|
}
|
2023-10-17 09:46:15 -04:00
|
|
|
|
|
|
|
variable "internal_load_balancer" {
|
|
|
|
type = bool
|
|
|
|
default = false
|
2023-12-15 04:36:58 -05:00
|
|
|
description = "Whether to use an internal load balancer for the cluster."
|
|
|
|
}
|
|
|
|
|
|
|
|
# GCP-specific variables
|
|
|
|
|
|
|
|
variable "project" {
|
|
|
|
type = string
|
|
|
|
description = "GCP project to deploy the cluster in."
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "region" {
|
|
|
|
type = string
|
|
|
|
description = "GCP region to deploy the cluster in."
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "zone" {
|
|
|
|
type = string
|
|
|
|
description = "GCP zone to deploy the cluster in."
|
2023-10-17 09:46:15 -04:00
|
|
|
}
|