From bac5a61b3915aa91f3fddf577cf3dd266786f41a Mon Sep 17 00:00:00 2001 From: Timo Furrer <tfurrer@gitlab.com> Date: Wed, 13 Nov 2024 10:10:04 +0100 Subject: [PATCH] Remove `TF_FF_AUTO_APPROVE_APPLY` feature flag This feature flag is now always enabled. Changelog: removed --- src/gitlab-tofu.sh | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/gitlab-tofu.sh b/src/gitlab-tofu.sh index 5ffb0a1..4daa0d4 100644 --- a/src/gitlab-tofu.sh +++ b/src/gitlab-tofu.sh @@ -15,10 +15,6 @@ if [ -z "$TF_FF_AUTO_URLENCODE_STATE_NAME" ]; then TF_FF_AUTO_URLENCODE_STATE_NAME=true fi -if [ -z "$TF_FF_AUTO_APPROVE_APPLY" ]; then - TF_FF_AUTO_APPROVE_APPLY=true -fi - # Helpers # Evaluate if this script is being sourced or executed directly. @@ -211,17 +207,12 @@ if [ $sourced -eq 0 ]; then case "${1}" in "apply") - auto_approve_args="" - if [ "${TF_FF_AUTO_APPROVE_APPLY}" = true ]; then - auto_approve_args="-auto-approve" - fi - $TF_IMPLICIT_INIT && terraform_init if [ "$TF_APPLY_NO_PLAN" = false ]; then - tofu "${TF_CHDIR_OPT}" "${@}" -input=false "${auto_approve_args}" "${TF_PLAN_CACHE}" + tofu "${TF_CHDIR_OPT}" "${@}" -input=false -auto-approve "${TF_PLAN_CACHE}" else # shellcheck disable=SC2086 - tofu "${TF_CHDIR_OPT}" "${@}" -input=false "${auto_approve_args}" ${var_file_args} + tofu "${TF_CHDIR_OPT}" "${@}" -input=false -auto-approve ${var_file_args} fi ;; "destroy") -- GitLab