Switch to alpine and manually provide terraform

This commit is contained in:
2023-11-01 09:56:04 +01:00
parent a9bff7a23a
commit 1b3bd0dbe7
2 changed files with 11 additions and 7 deletions

View File

@ -1,7 +1,8 @@
#!/bin/sh
working_dir=$(pwd)
cd "$PLUGIN_PATH" || exit 1
echo "change to $working_dir/$PLUGIN_PATH"
cd "$working_dir/$PLUGIN_PATH" || exit 1
terraform init
if [ "$PLUGIN_AUTO_APPROVE" = "true" ]
then
@ -15,6 +16,8 @@ then
else
command="apply"
fi
TF_TOKEN_app_terraform_io=$PLUGIN_API_TOKEN terraform "$command" -input=false"$auto_approve"
TF_TOKEN_app_terraform_io=$PLUGIN_API_TOKEN terraform output -json > "$working_dir/terraform_output"
echo "Run terraform init"
TF_TOKEN_app_terraform_io="$PLUGIN_API_TOKEN" terraform init
TF_TOKEN_app_terraform_io="$PLUGIN_API_TOKEN" terraform "$command" -input=false"$auto_approve"
TF_TOKEN_app_terraform_io="$PLUGIN_API_TOKEN" terraform output -json > "$working_dir/terraform_output"
cd "$working_dir" || exit 1