From a429605f3244371c770c2079aa78bec97154a65e Mon Sep 17 00:00:00 2001 From: Sebastian Serfling Date: Fri, 8 May 2026 15:36:33 +0200 Subject: [PATCH] simplify: nutze ~/.ssh/deploy vom proxmox host --- terraform/main.tf | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/terraform/main.tf b/terraform/main.tf index 4bf5d99..b49722a 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -49,11 +49,6 @@ resource "null_resource" "staging_lxc" { "apt-get install -y hugo nginx git rsync curl", "systemctl enable --now nginx", "useradd -m -s /bin/bash deploy 2>/dev/null || true", - "mkdir -p /home/deploy/.ssh", - "chmod 700 /home/deploy/.ssh", - "echo '${var.ssh_public_key}' >> /home/deploy/.ssh/authorized_keys", - "chmod 600 /home/deploy/.ssh/authorized_keys", - "chown -R deploy:deploy /home/deploy/.ssh", "mkdir -p /var/www/html", "chown -R deploy:deploy /var/www/html", "echo '✅ Staging VM Setup complete!'" @@ -62,7 +57,7 @@ resource "null_resource" "staging_lxc" { connection { type = "ssh" user = "root" - private_key = file("~/.ssh/deploy") + private_key = file(pathexpand("~/.ssh/deploy")) host = var.staging_ip timeout = "5m" }