terraform-aws-gitlab-runner
terraform-aws-gitlab-runner copied to clipboard
fix: fix user data tracing flag
Description
This commit fixes the tracing flag for bash in the user data.
Currently if you set the enable_runner_user_data_trace_log flag to false
expecting to disable the tracing in bash it will actually trace the user data script.
The reason is that the flag will be translated to user_data_trace_log == false
. Once the condition is evaluated in the script you get if [[ $(echo ${user_data_trace_log}) == false ]]
-> false == false
which is true
and ends up enabling set -x
.
This small change should fix it.
Migrations required
NO
Verification
Tested by running the script locally and setting the value in the current version to true
and saw the opposite result
Sounds reasonable to me.
@ravenolf I think it would be good to mention this change in the Migrations required
section. As the guys using this flag have to invert it in order to get the same results.
#604 fixes the TF Docs problem. Can be ignored.