File tree 1 file changed +19
-1
lines changed
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ echo 'min-required' > .terraform-version;
121
121
cleanup || log ' error' ' Cleanup failed?!' ;
122
122
123
123
124
- log ' info' ' ### Install min-required with TFENV_AUTO_INSTALL & -chdir' ;
124
+ log ' info' ' ### Install min-required with TFENV_AUTO_INSTALL & -chdir with rel path ' ;
125
125
126
126
minv=' 1.1.0' ;
127
127
@@ -138,6 +138,24 @@ echo 'min-required' > chdir-dir/.terraform-version
138
138
139
139
cleanup || log ' error' ' Cleanup failed?!' ;
140
140
141
+
142
+ log ' info' ' ### Install min-required with TFENV_AUTO_INSTALL & -chdir with abs path' ;
143
+
144
+ minv=' 1.2.3' ;
145
+
146
+ mkdir -p chdir-dir
147
+ echo " terraform {
148
+ required_version = \" >=${minv} \"
149
+ }" >> chdir-dir/min_required.tf;
150
+ echo ' min-required' > chdir-dir/.terraform-version
151
+
152
+ (
153
+ TFENV_AUTO_INSTALL=true terraform -chdir=" ${PWD} /chdir-dir" version;
154
+ check_active_version " ${minv} " chdir-dir;
155
+ ) || error_and_proceed ' Min required version from -chdir does not match' ;
156
+
157
+ cleanup || log ' error' ' Cleanup failed?!' ;
158
+
141
159
if [ " ${# errors[@]} " -gt 0 ]; then
142
160
log ' warn' ' ===== The following use_minrequired tests failed =====' ;
143
161
for error in " ${errors[@]} " ; do
You can’t perform that action at this time.
0 commit comments