68 lines
1.5 KiB
HCL
68 lines
1.5 KiB
HCL
variable "hcloud_token" {
|
|
type = string
|
|
description = "Hetzner Cloud API token used to create infrastructure"
|
|
}
|
|
|
|
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_private_key" {
|
|
type = string
|
|
description = "Private key used for SSH access to instances"
|
|
sensitive = true
|
|
}
|
|
|
|
variable "ssh_public_key" {
|
|
type = string
|
|
description = "Public key used for SSH access to instances"
|
|
}
|
|
|
|
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 "suffix" {
|
|
type = string
|
|
description = "Suffix added to names of all resources"
|
|
}
|
|
|
|
variable "cluster_registration_command" {
|
|
type = string
|
|
description = "Command to register the node with the cluster"
|
|
sensitive = true
|
|
}
|
|
|
|
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}"
|
|
node_name = "${local.cluster_name}-${var.suffix}"
|
|
}
|