Skip to content
Snippets Groups Projects
Unverified Commit 85271263 authored by Timo Furrer's avatar Timo Furrer
Browse files

Rename internal `JQ_PLAN` variable

parent 687fb902
No related branches found
No related tags found
No related merge requests found
......@@ -125,7 +125,7 @@ if [ -n "$TF_ADDRESS" ]; then
fi
fi
JQ_PLAN='
jq_plan='
(
[.resource_changes[]?.change.actions?] | flatten
) | {
......@@ -300,7 +300,7 @@ if [ $sourced -eq 0 ]; then
if [ "${GITLAB_TOFU_PLAN_WITH_JSON}" = 'true' ]; then
if [ "$ret" -eq 0 ] || [ "$ret" -eq 2 ]; then
if ! tofu "${tf_chdir_opt}" show -json "${GITLAB_TOFU_PLAN_CACHE}" | jq -r "${JQ_PLAN}" > "${GITLAB_TOFU_PLAN_JSON}"; then
if ! tofu "${tf_chdir_opt}" show -json "${GITLAB_TOFU_PLAN_CACHE}" | jq -r "${jq_plan}" > "${GITLAB_TOFU_PLAN_JSON}"; then
exit $?
fi
......@@ -312,7 +312,7 @@ if [ $sourced -eq 0 ]; then
exit "$ret"
;;
"plan-json")
tofu "${tf_chdir_opt}" show -json "${GITLAB_TOFU_PLAN_CACHE}" | jq -r "${JQ_PLAN}" > "${GITLAB_TOFU_PLAN_JSON}"
tofu "${tf_chdir_opt}" show -json "${GITLAB_TOFU_PLAN_CACHE}" | jq -r "${jq_plan}" > "${GITLAB_TOFU_PLAN_JSON}"
;;
"validate")
$GITLAB_TOFU_IMPLICIT_INIT && terraform_init -backend=false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment