update: rotate SSH access via cloud-init secret
All checks were successful
Terraform Plan / Terraform Plan (push) Successful in 17s

Inject SSH public key through Terraform/cloud-init from Gitea secret so access can be rotated without rebuilding the template image.
This commit is contained in:
2026-02-28 12:36:20 +00:00
parent 6fada2f32a
commit 17834b3aa7
6 changed files with 16 additions and 5 deletions

View File

@@ -2,8 +2,9 @@ data "template_file" "cloud_init_global" {
template = file("${path.module}/files/cloud_init_global.tpl")
vars = {
hostname = "generic"
domain = "home.arpa"
hostname = "generic"
domain = "home.arpa"
SSH_KEY_PUBLIC = var.SSH_KEY_PUBLIC
}
}

View File

@@ -8,3 +8,8 @@ resolv_conf:
preserve_hostname: false
fqdn: ${hostname}.${domain}
users:
- name: micqdf
ssh_authorized_keys:
- ${SSH_KEY_PUBLIC}

View File

@@ -66,3 +66,8 @@ variable "llama_vm_count" {
default = 1
description = "How many Llama VMs to create"
}
variable "SSH_KEY_PUBLIC" {
type = string
description = "Public SSH key injected via cloud-init"
}