aboutsummaryrefslogtreecommitdiffstats
path: root/hcloud-snapshot/variables.pkr.hcl
blob: 5aa8be1db848f6b973d737b4e9c5005f46a7aec6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
variable "hcloud_token" {
  type        = string
  description = "Hetnzer API token"
  sensitive   = true
}

variable "image_path" {
  type        = string
  description = "Path to the built OpenBSD raw zstd compressed image"
}

variable "version" {
  type        = string
  description = "Version of OpenBSD to build"
  validation {
    condition     = can(regex("^\\d\\.\\d$", var.version))
    error_message = "The version must be a single-digit followed by a period followed by another single digit."
  }
}

variable "arch" {
  type = string
  validation {
    condition     = contains(["amd64", "arm64"], var.arch)
    error_message = "The arch must be one of: amd64, arm64."
  }
}

variable "ssh_key" {
  type        = string
  description = "SSH key name in Hetzner to add to the image on launch"
}