about summary refs log tree commit diff
path: root/ops/terraform/deploy-nixos/main.tf
diff options
context:
space:
mode:
Diffstat (limited to 'ops/terraform/deploy-nixos/main.tf')
-rw-r--r--ops/terraform/deploy-nixos/main.tf17
1 files changed, 8 insertions, 9 deletions
diff --git a/ops/terraform/deploy-nixos/main.tf b/ops/terraform/deploy-nixos/main.tf
index d39610327a0e..4a3dc08f6c85 100644
--- a/ops/terraform/deploy-nixos/main.tf
+++ b/ops/terraform/deploy-nixos/main.tf
@@ -14,11 +14,6 @@ variable "attrpath" {
   type        = string
 }
 
-variable "target_name" {
-  description = "unique name of the target machine"
-  type        = string
-}
-
 variable "target_host" {
   description = "address (IP or hostname) at which the target is reachable"
   type        = string
@@ -45,6 +40,12 @@ variable "target_user_ssh_key" {
   sensitive   = true
 }
 
+variable "triggers" {
+  type        = map(string)
+  description = "Triggers for deploy"
+  default     = {}
+}
+
 # Fetch the derivation hash for the NixOS system.
 data "external" "nixos_system" {
   program = ["${path.module}/nixos-eval.sh"]
@@ -96,12 +97,10 @@ resource "null_resource" "nixos_deploy" {
     ]
   }
 
-  triggers = {
+  triggers = merge({
     nixos_drv   = data.external.nixos_system.result.drv
-    attrpath    = var.attrpath
     target_host = var.target_host
-    target_name = var.target_name
-  }
+  }, var.triggers)
 }
 
 output "nixos_drv" {