Maybe terraform will cooperate now?

Signed-off-by: magic_rb <richard@brezak.sk>
This commit is contained in:
magic_rb 2023-10-15 18:43:19 +02:00
parent 40766d249e
commit 0ca6ec76c4
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E
2 changed files with 10 additions and 4 deletions

View file

@ -6,6 +6,9 @@ let
in
{
resource."nomad_job"."website" = nomadJob {
lifecycle.replace_triggered_by = [
"resource.nomad_job.website.hcl2[0].vars[\"flake_path\"]"
];
jobspec = ./job.hcl;
vars = {
flake_ref = "${vars.flake_host}?rev=${vars.flake_rev}&ref=${vars.flake_ref}";

View file

@ -9,8 +9,11 @@
enabled = true;
inherit vars;
};
lifecycle.ignore_changes = [
lifecycle = {
ignore_changes = [
"hcl2[0].vars[\"flake_ref\"]"
"hcl2[0].vars[\"flake_sha\"]"
];
create_before_destroy = true;
};
} // builtins.removeAttrs args [ "jobspec" "vars" ]