Files
server/infra/variables.tf
T

94 lines
2.6 KiB
Terraform

variable "location" {
description = "Hetzner Cloud datacenter location for all servers and volumes."
type = string
default = "nbg1"
}
variable "network_zone" {
description = "Hetzner Cloud network zone matching var.location."
type = string
default = "eu-central"
}
variable "server_image" {
description = "OS image used for all servers."
type = string
default = "ubuntu-24.04"
}
variable "dev_server_type" {
description = "Server type for dev"
type = string
default = "cx22"
}
variable "prod_server_type" {
description = "Server type for prod"
type = string
default = "cx22"
}
variable "vpn_server_type" {
description = "Server type for vpn"
type = string
default = "cx22"
}
variable "dev_volume_size" {
description = "Size in GB of the volume attached to dev"
type = number
default = 20
}
variable "prod_volume_size" {
description = "Size in GB of the volume attached to prod (disk1 in docs/architecture.md)."
type = number
default = 20
}
variable "network_ip_range" {
description = "IP range of the private network shared by dev and prod."
type = string
default = "10.0.0.0/16"
}
variable "subnet_ip_range" {
description = "IP range of the network subnet shared by dev and prod."
type = string
default = "10.0.1.0/24"
}
variable "dev_private_ip" {
description = "Private network IP for dev."
type = string
default = "10.0.1.10"
}
variable "prod_private_ip" {
description = "Private network IP for prod."
type = string
default = "10.0.1.11"
}
variable "ssh_key_name" {
description = "Name of an SSH key already uploaded to your Hetzner Cloud project (Console > Security > SSH Keys)."
type = string
}
variable "allowed_ssh_source_ips" {
description = "CIDRs allowed to reach port 22 on the vpn server. Narrow this to your own IP(s) once known. dev and prod don't use this - their SSH is restricted to the vpn server's own public IP instead (see infra/main.tf)."
type = list(string)
default = ["0.0.0.0/0", "::/0"]
}
variable "ssh_private_key_path" {
description = "Local path to the private key matching var.ssh_key_name. Used once per server by OpenTofu to upload and run the post-install bootstrap script over SSH immediately after creation (see infra/scripts/bootstrap.sh.tftpl)."
type = string
}
variable "deploy_user" {
description = "Non-root sudo user created on every server by the bootstrap script, with the same SSH key as root."
type = string
default = "deploy"
}