diff --git a/terraform/main.tf b/terraform/main.tf index b2e9720..4bf5d99 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -42,12 +42,7 @@ resource "null_resource" "staging_lxc" { command = "sleep 30" } - # SSH Key Setup - provisioner "local-exec" { - command = "mkdir -p ~/.ssh && echo '${var.ssh_private_key}' | base64 -d > ~/.ssh/staging_key && chmod 600 ~/.ssh/staging_key" - } - - # Setup via SSH + # Setup via SSH (nutzt ~/.ssh/deploy vom Proxmox Host) provisioner "remote-exec" { inline = [ "apt-get update -qq", @@ -67,7 +62,7 @@ resource "null_resource" "staging_lxc" { connection { type = "ssh" user = "root" - private_key = var.ssh_private_key + private_key = file("~/.ssh/deploy") host = var.staging_ip timeout = "5m" }