about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ops/glesys/default.nix14
1 files changed, 6 insertions, 8 deletions
diff --git a/ops/glesys/default.nix b/ops/glesys/default.nix
index 80a86fec70c9..e511e1f6b686 100644
--- a/ops/glesys/default.nix
+++ b/ops/glesys/default.nix
@@ -6,12 +6,10 @@ depot.nix.readTree.drvTargets rec {
     depot.third_party.terraform-provider-glesys
   ]);
 
-  validate = pkgs.runCommand "tf-validate-glesys"
-    {
-      GLESYS_TOKEN = "ci-dummy";
-    } ''
-    cp -r ${lib.cleanSource ./.}/* . && chmod -R u+w .
-    ${terraform}/bin/terraform init -upgrade -backend=false -input=false
-    ${terraform}/bin/terraform validate | tee $out
-  '';
+  validate = depot.tools.checks.validateTerraform {
+    inherit terraform;
+    name = "glesys";
+    src = lib.cleanSource ./.;
+    env.GLESYS_TOKEN = "ci-dummy";
+  };
 }