Skip to content

Commit 3c285d3

Browse files
authored
Merge pull request #389 from dflook/link-var-files
Create auto var files as symlinks
2 parents 10cc0c3 + 7403416 commit 3c285d3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

image/actions.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ function setup() {
150150
detect-tfmask
151151

152152
execute_run_commands
153+
154+
create-auto-tfvars
153155
}
154156

155157
function relative_to() {
@@ -181,8 +183,6 @@ function set-init-args() {
181183
INIT_ARGS="$INIT_ARGS -backend-config=$config"
182184
done
183185
fi
184-
185-
create-auto-tfvars
186186
}
187187

188188
##
@@ -409,7 +409,8 @@ function create-auto-tfvars() {
409409

410410
if [[ -n "${INPUT_VARIABLES:-}" ]]; then
411411
debug_log "Creating autoloading tfvars file for the variables input: zzzz-dflook-terraform-github-actions-$AUTO_TFVARS_COUNTER.auto.tfvars"
412-
echo "$INPUT_VARIABLES" >"$INPUT_PATH/zzzz-dflook-terraform-github-actions-$AUTO_TFVARS_COUNTER.auto.tfvars"
412+
echo "$INPUT_VARIABLES" >"$STEP_TMP_DIR/zzzz-dflook-terraform-github-actions-$AUTO_TFVARS_COUNTER.auto.tfvars"
413+
ln -s "$STEP_TMP_DIR/zzzz-dflook-terraform-github-actions-$AUTO_TFVARS_COUNTER.auto.tfvars" "$INPUT_PATH/zzzz-dflook-terraform-github-actions-$AUTO_TFVARS_COUNTER.auto.tfvars"
413414
fi
414415
}
415416

0 commit comments

Comments
 (0)