terraform fmt
Some checks failed
Gitea Actions Demo / Terraform Plan (push) Failing after 19s

This commit is contained in:
MichaelFisher1997 2025-04-17 17:02:46 +01:00
parent c1c533f92d
commit 36cba568f2
3 changed files with 16 additions and 11 deletions

View File

@ -17,8 +17,10 @@ jobs:
pull-requests: write
env:
TF_VAR_TAILSCALE_KEY: ${{ secrets.TAILSCALE_KEY }}
TF_VAR_TS_AUTHKEY: ${{ secrets.TAILSCALE_KEY }}
TF_VAR_ssh_key: ${{ secrets.SSH_PUBLIC_KEY }}
TF_VAR_tailscale_key: ${{ secrets.TAILSCALE_KEY }}
steps:
- name: Checkout repository

View File

@ -7,10 +7,11 @@ data "template_file" "cloud_init_alpaca" {
ssh_key = var.ssh_key
hostname = "alpaca-${count.index + 1}"
domain = "home.arpa"
tailscale_key = var.tailscale_key
TS_AUTHKEY = var.TS_AUTHKEY
}
}
resource "local_file" "cloud_init_alpaca" {
count = var.alpaca_vm_count
content = data.template_file.cloud_init_alpaca[count.index].rendered
@ -41,10 +42,11 @@ data "template_file" "cloud_init_llama" {
ssh_key = var.ssh_key
hostname = "llama-${count.index + 1}"
domain = "home.arpa"
tailscale_key = var.tailscale_key
TS_AUTHKEY = var.TS_AUTHKEY
}
}
resource "local_file" "cloud_init_llama" {
count = var.llama_vm_count
content = data.template_file.cloud_init_llama[count.index].rendered

View File

@ -74,11 +74,12 @@ variable "llama_vm_count" {
description = "How many Llama VMs to create"
}
variable "tailscale_key" {
variable "TS_AUTHKEY" {
type = string
description = "Tailscale auth key"
description = "Tailscale auth key used in cloud-init"
}
variable "ssh_key" {
type = string
description = "Public SSH key used by cloud-init"