2022-10-21 06:24:18 -04:00
|
|
|
variable "name" {
|
|
|
|
type = string
|
|
|
|
description = "Name of your Constellation"
|
2023-01-23 04:37:28 -05:00
|
|
|
validation {
|
2023-07-17 11:45:41 -04:00
|
|
|
condition = length(var.name) <= 10
|
|
|
|
error_message = "The length of the name of the Constellation must be <= 10 characters"
|
2023-01-23 04:37:28 -05:00
|
|
|
}
|
2023-11-03 05:09:43 -04:00
|
|
|
validation {
|
|
|
|
condition = var.name == lower(var.name)
|
|
|
|
error_message = "The name of the Constellation must be in lowercase"
|
|
|
|
}
|
2022-10-21 06:24:18 -04:00
|
|
|
}
|
|
|
|
|
2023-06-23 11:19:43 -04:00
|
|
|
variable "node_groups" {
|
|
|
|
type = map(object({
|
2023-06-30 04:53:00 -04:00
|
|
|
role = string
|
|
|
|
initial_count = optional(number)
|
|
|
|
instance_type = string
|
|
|
|
disk_size = number
|
|
|
|
disk_type = string
|
|
|
|
zone = string
|
2023-06-23 11:19:43 -04:00
|
|
|
}))
|
|
|
|
description = "A map of node group names to node group configurations."
|
|
|
|
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-10-21 06:24:18 -04:00
|
|
|
variable "iam_instance_profile_worker_nodes" {
|
|
|
|
type = string
|
|
|
|
description = "Name of the IAM instance profile for worker nodes"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "iam_instance_profile_control_plane" {
|
|
|
|
type = string
|
|
|
|
description = "Name of the IAM instance profile for control plane nodes"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "ami" {
|
|
|
|
type = string
|
|
|
|
description = "AMI ID"
|
2023-01-23 04:37:28 -05:00
|
|
|
validation {
|
|
|
|
condition = length(var.ami) > 4 && substr(var.ami, 0, 4) == "ami-"
|
|
|
|
error_message = "The image_id value must be a valid AMI id, starting with \"ami-\"."
|
|
|
|
}
|
2022-10-21 06:24:18 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "region" {
|
|
|
|
type = string
|
|
|
|
description = "The AWS region to create the cluster in"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "zone" {
|
|
|
|
type = string
|
|
|
|
description = "The AWS availability zone name to create the cluster in"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "debug" {
|
|
|
|
type = bool
|
2023-01-23 04:37:28 -05:00
|
|
|
default = false
|
2022-10-21 06:24:18 -04:00
|
|
|
description = "Enable debug mode. This opens up a debugd port that can be used to deploy a custom bootstrapper."
|
|
|
|
}
|
2023-06-09 09:41:02 -04:00
|
|
|
|
|
|
|
variable "enable_snp" {
|
|
|
|
type = bool
|
|
|
|
default = true
|
|
|
|
description = "Enable AMD SEV SNP. Setting this to true sets the cpu-option AmdSevSnp to enable."
|
|
|
|
}
|
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 = "Use an internal load balancer."
|
|
|
|
}
|