devops/infra/modules/cluster/hcloud/variables.tf

59 lines
1.2 KiB
HCL

variable "hcloud_token" {
type = string
description = "Hetzner Cloud API token used to create infrastructure"
}
variable "node_count" {
type = number
default = 1
}
variable "hcloud_location" {
type = string
description = "Hetzner location used for all resources"
default = "fsn1"
}
variable "hcloud_network_id" {
type = string
description = "ID of the network to use for all resources"
}
variable "ssh_key_id" {
type = string
description = "ID of the ssh key for this node"
}
variable "instance_type" {
type = string
description = "Type of instance to be used for all instances"
default = "cpx21"
}
variable "prefix" {
type = string
description = "Prefix added to names of all resources"
}
variable "name" {
type = string
description = "Name of the node"
}
variable "cluster_registration_command" {
type = string
description = "Command to register the node with the cluster"
}
variable "node_image" {
type = string
description = "Image to use for the node"
default = "ubuntu-22.04"
}
# Local variables used to reduce repetition
locals {
node_username = "root"
cluster_name = "${var.prefix}-${var.name}"
}