Compare commits

..

No commits in common. "2b8233e87084143db0ea83084ec80f57c781dcaa" and "72f0080660780fabcd9deca02dee455145f2f3c5" have entirely different histories.

2 changed files with 10 additions and 13 deletions

View File

@ -4,7 +4,7 @@ data "template_file" "cloud_init_alpaca" {
template = file("${path.module}/files/cloud_init.yaml") template = file("${path.module}/files/cloud_init.yaml")
vars = { vars = {
ssh_key = var.ssh_key ssh_key = file("~/.ssh/id_ed25519.pub")
hostname = "alpaca-${count.index + 1}" hostname = "alpaca-${count.index + 1}"
domain = "home.arpa" domain = "home.arpa"
tailscale_key = var.tailscale_key tailscale_key = var.tailscale_key
@ -21,9 +21,10 @@ resource "null_resource" "upload_cloud_init_alpaca" {
count = var.alpaca_vm_count count = var.alpaca_vm_count
connection { connection {
type = "ssh" type = "ssh"
user = "root" user = "root"
host = var.target_node private_key = file("~/.ssh/id_ed25519")
host = var.target_node
} }
provisioner "file" { provisioner "file" {
@ -38,7 +39,7 @@ data "template_file" "cloud_init_llama" {
template = file("${path.module}/files/cloud_init.yaml") template = file("${path.module}/files/cloud_init.yaml")
vars = { vars = {
ssh_key = var.ssh_key ssh_key = file("~/.ssh/id_ed25519.pub")
hostname = "llama-${count.index + 1}" hostname = "llama-${count.index + 1}"
domain = "home.arpa" domain = "home.arpa"
tailscale_key = var.tailscale_key tailscale_key = var.tailscale_key
@ -55,9 +56,10 @@ resource "null_resource" "upload_cloud_init_llama" {
count = var.llama_vm_count count = var.llama_vm_count
connection { connection {
type = "ssh" type = "ssh"
user = "root" user = "root"
host = var.target_node private_key = file("~/.ssh/id_ed25519")
host = var.target_node
} }
provisioner "file" { provisioner "file" {

View File

@ -79,8 +79,3 @@ variable "tailscale_key" {
description = "Tailscale auth key" description = "Tailscale auth key"
} }
variable "ssh_key" {
type = string
description = "Public SSH key used by cloud-init"
}