refactor(ops/keycloak): Use tools.checks.validateTerraform

Remove some ~commit message~ ... uh, code duplication.

Change-Id: Id6e8f2132999e153d3984848f95ccabd52e4f45f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5853
Tested-by: BuildkiteCI
Reviewed-by: asmundo <asmundo@gmail.com>
This commit is contained in:
Vincent Ambo 2022-06-06 21:29:28 +00:00 committed by tazjin
parent 92a6e25380
commit 8e8d6eb1df

View file

@ -6,9 +6,9 @@ depot.nix.readTree.drvTargets rec {
p.keycloak
]);
validate = pkgs.runCommand "tf-validate-keycloak" { } ''
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 = "keycloak";
src = lib.cleanSource ./.;
};
}