Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OpenTofu
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
components
OpenTofu
Commits
447fe033
Unverified
Commit
447fe033
authored
8 months ago
by
Timo Furrer
Browse files
Options
Downloads
Patches
Plain Diff
Rename `TF_INIT_NO_RECONFIGURE` to `GITLAB_TOFU_INIT_NO_RECONFIGURE`
Changelog: changed
parent
6cf02038
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/gitlab-tofu.sh
+3
-2
3 additions, 2 deletions
src/gitlab-tofu.sh
tests/unit/gitlab-tofu.bats
+1
-1
1 addition, 1 deletion
tests/unit/gitlab-tofu.bats
with
4 additions
and
3 deletions
src/gitlab-tofu.sh
+
3
−
2
View file @
447fe033
...
...
@@ -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_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_INIT_NO_RECONFIGURE: if set to true will not pass `-reconfigure` to the `tofu init` command.
#
# Respected OpenTofu Environment Variables:
# > these are variables that are
...
...
@@ -213,9 +214,9 @@ GITLAB_TOFU_IMPLICIT_INIT=${GITLAB_TOFU_IMPLICIT_INIT:-true}
GITLAB_TOFU_IGNORE_INIT_ERRORS
=
${
GITLAB_TOFU_IGNORE_INIT_ERRORS
:-
false
}
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.
if
[
"
$
TF
_INIT_NO_RECONFIGURE
"
!=
'true'
]
;
then
if
[
"
$
GITLAB_TOFU
_INIT_NO_RECONFIGURE
"
!=
'true'
]
;
then
tf_init_reconfigure_flag
=
'-reconfigure'
fi
...
...
This diff is collapsed.
Click to expand it.
tests/unit/gitlab-tofu.bats
+
1
−
1
View file @
447fe033
...
...
@@ -59,7 +59,7 @@ teardown() {
}
EOF
export
TF
_INIT_NO_RECONFIGURE="true"
export
GITLAB_TOFU
_INIT_NO_RECONFIGURE="true"
run ! gitlab-tofu init -no-color
assert_output --partial "Error: Backend configuration changed"
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment