1
0
Fork 0

feat: add talos v1.10.3

Signed-off-by: Vojtěch Mareš <vojtech@mares.cz>
This commit is contained in:
Vojtěch Mareš 2025-06-13 20:49:39 +02:00
parent 1bfc4141b4
commit 682d5f1e02
Signed by: vojtech.mares
GPG key ID: C6827B976F17240D
3 changed files with 60 additions and 0 deletions

View file

@ -0,0 +1,58 @@
# hcloud.pkr.hcl
packer {
required_plugins {
hcloud = {
source = "github.com/hetznercloud/hcloud"
version = ">= 1.6.0, < 2.0.0"
}
}
}
locals {
image = "https://factory.talos.dev/image/376567988ad370138ad8b2698212367b8edcb69b5fd68c80be1f2ec7d603b4ba/${local.talos_version}/hcloud-${var.arch}.raw.xz"
talos_version = "v1.10.3"
}
variable "hcloud_token" {
type = string
default = env("HCLOUD_TOKEN")
sensitive = true
}
source "hcloud" "talos" {
token = var.hcloud_token
rescue = "linux64"
image = "debian-11"
location = "fsn1"
ssh_username = "root"
snapshot_labels = {
type = "infra",
os = "talos",
version = "${local.talos_version}",
}
}
build {
source "hcloud.talos" {
name = "x86"
server_type = "cx22"
snapshot_name = "talos-${local.talos_version}-amd64-${formatdate("YYYY-MM-DD", timestamp())}"
}
source "hcloud.talos" {
name = "arm"
server_type = "cax11"
snapshot_name = "talos-${local.talos_version}-arm64-${formatdate("YYYY-MM-DD", timestamp())}"
}
provisioner "shell" {
inline = [
"apt-get install -y wget",
"wget -O /tmp/talos.raw.xz ${local.image}",
"xz -d -c /tmp/talos.raw.xz | dd of=/dev/sda && sync",
]
}
}