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

Rename `TF_INIT_NO_RECONFIGURE` to `GITLAB_TOFU_INIT_NO_RECONFIGURE`

Changelog: changed
parent 6cf02038
Branches
Tags
No related merge requests found
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
# GITLAB_TOFU_PLAN_JSON: if set is the full path of the plan json file. Defaults to `<root>/$GITLAB_TOFU_PLAN_NAME.json` # GITLAB_TOFU_PLAN_JSON: if set is the full path of the plan json file. Defaults to `<root>/$GITLAB_TOFU_PLAN_NAME.json`
# GITLAB_TOFU_IMPLICIT_INIT: if set to true will perform an implicit `tofu init` before any command that require it. Defaults to `true`. # GITLAB_TOFU_IMPLICIT_INIT: if set to true will perform an implicit `tofu init` before any command that require it. Defaults to `true`.
# GITLAB_TOFU_IGNORE_INIT_ERRORS: if set to true will ignore errors in the `tofu init` command. # GITLAB_TOFU_IGNORE_INIT_ERRORS: if set to true will ignore errors in the `tofu init` command.
# GITLAB_TOFU_INIT_NO_RECONFIGURE: if set to true will not pass `-reconfigure` to the `tofu init` command.
# #
# Respected OpenTofu Environment Variables: # Respected OpenTofu Environment Variables:
# > these are variables that are # > these are variables that are
...@@ -213,9 +214,9 @@ GITLAB_TOFU_IMPLICIT_INIT=${GITLAB_TOFU_IMPLICIT_INIT:-true} ...@@ -213,9 +214,9 @@ GITLAB_TOFU_IMPLICIT_INIT=${GITLAB_TOFU_IMPLICIT_INIT:-true}
GITLAB_TOFU_IGNORE_INIT_ERRORS=${GITLAB_TOFU_IGNORE_INIT_ERRORS:-false} GITLAB_TOFU_IGNORE_INIT_ERRORS=${GITLAB_TOFU_IGNORE_INIT_ERRORS:-false}
terraform_init() { terraform_init() {
# If TF_INIT_NO_RECONFIGURE is not set to 'true', # If GITLAB_TOFU_INIT_NO_RECONFIGURE is not set to 'true',
# a `-reconfigure` flag is added to the `terraform init` command. # a `-reconfigure` flag is added to the `terraform init` command.
if [ "$TF_INIT_NO_RECONFIGURE" != 'true' ]; then if [ "$GITLAB_TOFU_INIT_NO_RECONFIGURE" != 'true' ]; then
tf_init_reconfigure_flag='-reconfigure' tf_init_reconfigure_flag='-reconfigure'
fi fi
......
...@@ -59,7 +59,7 @@ teardown() { ...@@ -59,7 +59,7 @@ teardown() {
} }
EOF EOF
export TF_INIT_NO_RECONFIGURE="true" export GITLAB_TOFU_INIT_NO_RECONFIGURE="true"
run ! gitlab-tofu init -no-color run ! gitlab-tofu init -no-color
assert_output --partial "Error: Backend configuration changed" assert_output --partial "Error: Backend configuration changed"
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment