From aea15084fdb147f76ae92ca5a8e5aaff0133b332 Mon Sep 17 00:00:00 2001 From: Kiara Grouwstra Date: Mon, 20 Oct 2025 17:28:57 +0200 Subject: [PATCH] trigger update by codebase hash Signed-off-by: Kiara Grouwstra --- deployment/run/tf-proxmox/main.tf | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/deployment/run/tf-proxmox/main.tf b/deployment/run/tf-proxmox/main.tf index 94571386..a61139bc 100644 --- a/deployment/run/tf-proxmox/main.tf +++ b/deployment/run/tf-proxmox/main.tf @@ -33,11 +33,11 @@ provider "proxmox" { } } -# # hash of our code directory, used to trigger re-deploy -# # FIXME calculate separately to reduce false positives -# data "external" "hash" { -# program = ["sh", "-c", "echo \"{\\\"hash\\\":\\\"$(nix-hash ..)\\\"}\""] -# } +# hash of our code directory, used to trigger re-deploy +# FIXME calculate separately to reduce false positives +data "external" "hash" { + program = ["sh", "-c", "echo \"{\\\"hash\\\":\\\"$(nix-hash ../../..)\\\"}\""] +} # FIXME separate # FIXME (un)stream @@ -175,6 +175,7 @@ resource "null_resource" "await_ssh" { # FIXME expose (and handle thru) [`exec`](https://pve.proxmox.com/pve-docs/api-viewer/#/nodes/{node}/qemu/{vmid}/agent/exec) endpoint in proxmox TF provider? wait, what command would i use it for?: https://github.com/bpg/terraform-provider-proxmox/issues/1576 module "nixos-rebuild" { depends_on = [ + data.external.hash null_resource.await_ssh ] source = "../tf-single-host"