add output

This commit is contained in:
Michael Jerger 2024-08-07 09:11:08 +02:00
parent eb227db9c6
commit 2e8d064e61
3 changed files with 8 additions and 3 deletions

View file

@ -30,7 +30,8 @@
(defn-spec terragrunt-apply! nil?
[devops ::d/devops]
(let [final (merge default devops)]
(doseq [c (domain/terragrunt-apply-command final)]
(doseq [c (into (domain/terragrunt-apply-command final)
(domain/terragrunt-output-command final))]
(i/execute! c final))))
(defn-spec terragrunt-destroy! nil?

View file

@ -26,9 +26,13 @@
(defn-spec terragrunt-apply-command seq?
[devops ::devops]
[[{:dir (d/build-path devops)} "terragrunt" "init"]
[{:dir (d/build-path devops)} "terragrunt" "apply"]])
[{:dir (d/build-path devops)} "terragrunt" "apply" "-auto-approve"]])
(defn-spec terragrunt-destroy-command seq?
[devops ::devops]
[[{:dir (d/build-path devops)} "terragrunt" "init"]
[{:dir (d/build-path devops)} "terragrunt" "destroy"]])
(defn-spec terragrunt-output-command seq?
[devops ::devops]
[[{:dir (d/build-path devops)} "bash" "-c" "terragrunt output -json > terraform.json"]])

View file

@ -47,7 +47,7 @@
(deftest should-calculate-terragrunt-apply-command
(is (= [[{:dir "../../../target/test/statistics"} "terragrunt" "init"]
[{:dir "../../../target/test/statistics"} "terragrunt" "apply"]]
[{:dir "../../../target/test/statistics"} "terragrunt" "apply" "-auto-approve"]]
(cut/terragrunt-apply-command {:name "test"
:module "statistics"
:project-root-path "../../.."