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 p.keycloak
]); ]);
validate = pkgs.runCommand "tf-validate-keycloak" { } '' validate = depot.tools.checks.validateTerraform {
cp -r ${lib.cleanSource ./.}/* . && chmod -R u+w . inherit terraform;
${terraform}/bin/terraform init -upgrade -backend=false -input=false name = "keycloak";
${terraform}/bin/terraform validate | tee $out src = lib.cleanSource ./.;
''; };
} }