Add option for speculative plans
This commit is contained in:
8
tool.sh
8
tool.sh
@ -9,6 +9,12 @@ then
|
|||||||
else
|
else
|
||||||
auto_approve=""
|
auto_approve=""
|
||||||
fi
|
fi
|
||||||
TF_TOKEN_app_terraform_io=$PLUGIN_API_TOKEN terraform apply -input=false"$auto_approve"
|
if [ "$PLUGIN_SPECULATIVE" = "true" ]
|
||||||
|
then
|
||||||
|
command="plan"
|
||||||
|
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"
|
TF_TOKEN_app_terraform_io=$PLUGIN_API_TOKEN terraform output -json > "$working_dir/terraform_output"
|
||||||
cd "$working_dir" || exit 1
|
cd "$working_dir" || exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user