Compare commits

...

2 Commits

Author SHA1 Message Date
MichaelFisher1997
2b8233e870 terraform fmt
Some checks failed
Gitea Actions Demo / Terraform Plan (push) Has been cancelled
2025-04-17 16:54:35 +01:00
MichaelFisher1997
c430a206c3 terraform fmt 2025-04-17 16:54:21 +01:00
2 changed files with 13 additions and 10 deletions

View File

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

View File

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