https://github.com/tfutils/tfscaffold/blame/d782a759c369d4aaab564338b5338cad3ede4e9a/bin/terraform.sh#L8
The enforcing of set -u in the terraform.sh script causes the script to fail, in the event that no additional parameters are passed to terraform.
Line 284: declare extra_args="${@} ${no_color}"; # All arguments supplied after "--" returns the following error:
bin/terraform.sh: line 284: @: unbound variable
This is because once all of our provided parameters are parsed, ${@} returns empty, in violation of the unbound variable setting.
The script does however pass if I include some dummy config, e.g. bin/terraform.sh --project myproj --region eu-west-2 --bootstrap --action plan -- -var="test=test"
https://github.com/tfutils/tfscaffold/blame/d782a759c369d4aaab564338b5338cad3ede4e9a/bin/terraform.sh#L8
The enforcing of
set -uin the terraform.sh script causes the script to fail, in the event that no additional parameters are passed to terraform.Line 284:
declare extra_args="${@} ${no_color}"; # All arguments supplied after "--"returns the following error:bin/terraform.sh: line 284: @: unbound variableThis is because once all of our provided parameters are parsed, ${@} returns empty, in violation of the unbound variable setting.
The script does however pass if I include some dummy config, e.g.
bin/terraform.sh --project myproj --region eu-west-2 --bootstrap --action plan -- -var="test=test"