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 pull-requests: write
env: 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_ssh_key: ${{ secrets.SSH_PUBLIC_KEY }}
TF_VAR_tailscale_key: ${{ secrets.TAILSCALE_KEY }}
steps: steps:
- name: Checkout repository - name: Checkout repository

View File

@ -4,13 +4,14 @@ 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 = var.ssh_key
hostname = "alpaca-${count.index + 1}" hostname = "alpaca-${count.index + 1}"
domain = "home.arpa" domain = "home.arpa"
tailscale_key = var.tailscale_key TS_AUTHKEY = var.TS_AUTHKEY
} }
} }
resource "local_file" "cloud_init_alpaca" { resource "local_file" "cloud_init_alpaca" {
count = var.alpaca_vm_count count = var.alpaca_vm_count
content = data.template_file.cloud_init_alpaca[count.index].rendered content = data.template_file.cloud_init_alpaca[count.index].rendered
@ -38,13 +39,14 @@ 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 = var.ssh_key
hostname = "llama-${count.index + 1}" hostname = "llama-${count.index + 1}"
domain = "home.arpa" domain = "home.arpa"
tailscale_key = var.tailscale_key TS_AUTHKEY = var.TS_AUTHKEY
} }
} }
resource "local_file" "cloud_init_llama" { resource "local_file" "cloud_init_llama" {
count = var.llama_vm_count count = var.llama_vm_count
content = data.template_file.cloud_init_llama[count.index].rendered 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" description = "How many Llama VMs to create"
} }
variable "tailscale_key" { variable "TS_AUTHKEY" {
type = string type = string
description = "Tailscale auth key" description = "Tailscale auth key used in cloud-init"
} }
variable "ssh_key" { variable "ssh_key" {
type = string type = string
description = "Public SSH key used by cloud-init" description = "Public SSH key used by cloud-init"