From ec07db08dbdcf1dd9156e0bf7545fe07de9ef5e9 Mon Sep 17 00:00:00 2001 From: MichaelFisher1997 Date: Thu, 17 Apr 2025 19:21:23 +0100 Subject: [PATCH] terraform fmt --- .gitea/workflows/terraform-apply.yml | 1 + .gitea/workflows/terraform-destroy.yml | 6 ++++-- .gitea/workflows/terraform-plan.yml | 3 +-- terraform/cloud-init.tf | 4 ++-- terraform/variables.tf | 4 ++-- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/terraform-apply.yml b/.gitea/workflows/terraform-apply.yml index c270852..44d41a8 100644 --- a/.gitea/workflows/terraform-apply.yml +++ b/.gitea/workflows/terraform-apply.yml @@ -16,6 +16,7 @@ jobs: pull-requests: write env: + TF_VAR_SSH_KEY: ${{ secrets.SSH_KEY }} TF_VAR_TS_AUTHKEY: ${{ secrets.TAILSCALE_KEY }} TF_VAR_ssh_key: ${{ secrets.SSH_PUBLIC_KEY }} diff --git a/.gitea/workflows/terraform-destroy.yml b/.gitea/workflows/terraform-destroy.yml index a367735..0ab30af 100644 --- a/.gitea/workflows/terraform-destroy.yml +++ b/.gitea/workflows/terraform-destroy.yml @@ -14,8 +14,10 @@ jobs: pull-requests: write env: - TF_VAR_TS_AUTHKEY: ${{ secrets.TAILSCALE_KEY }} - TF_VAR_ssh_key: ${{ secrets.SSH_PUBLIC_KEY }} + TF_VAR_SSH_KEY: ${{ secrets.SSH_KEY }} + TF_VAR_TS_AUTHKEY: ${{ secrets.TAILSCALE_KEY }} + TF_VAR_ssh_key: ${{ secrets.SSH_PUBLIC_KEY }} + steps: - name: Checkout repository diff --git a/.gitea/workflows/terraform-plan.yml b/.gitea/workflows/terraform-plan.yml index 9f8a56b..267f57c 100644 --- a/.gitea/workflows/terraform-plan.yml +++ b/.gitea/workflows/terraform-plan.yml @@ -17,11 +17,10 @@ jobs: pull-requests: write env: - TF_VAR_TAILSCALE_KEY: ${{ secrets.TAILSCALE_KEY }} + TF_VAR_SSH_KEY: ${{ secrets.SSH_KEY }} TF_VAR_TS_AUTHKEY: ${{ secrets.TAILSCALE_KEY }} TF_VAR_ssh_key: ${{ secrets.SSH_PUBLIC_KEY }} - steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/terraform/cloud-init.tf b/terraform/cloud-init.tf index 216482e..6c052e4 100644 --- a/terraform/cloud-init.tf +++ b/terraform/cloud-init.tf @@ -4,7 +4,7 @@ data "template_file" "cloud_init_alpaca" { template = file("${path.module}/files/cloud_init.yaml") vars = { - ssh_key = var.ssh_key + ssh_key = var.SSH_KEY hostname = "alpaca-${count.index + 1}" domain = "home.arpa" TS_AUTHKEY = var.TS_AUTHKEY @@ -39,7 +39,7 @@ data "template_file" "cloud_init_llama" { template = file("${path.module}/files/cloud_init.yaml") vars = { - ssh_key = var.ssh_key + ssh_key = var.SSH_KEY hostname = "llama-${count.index + 1}" domain = "home.arpa" TS_AUTHKEY = var.TS_AUTHKEY diff --git a/terraform/variables.tf b/terraform/variables.tf index 397e4f8..bf1ab3a 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -80,8 +80,8 @@ variable "TS_AUTHKEY" { } -variable "ssh_key" { +variable "SSH_KEY" { type = string - description = "Public SSH key used by cloud-init" + description = "Private SSH key used to upload cloud-init files to Proxmox" }