terraform-aws-gitlab-runner icon indicating copy to clipboard operation
terraform-aws-gitlab-runner copied to clipboard

fix: fix user data tracing flag

Open ravenolf opened this issue 2 years ago • 2 comments

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

ravenolf avatar Jul 12 '22 16:07 ravenolf

Sounds reasonable to me.

kayman-mk avatar Jul 12 '22 22:07 kayman-mk

@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.

kayman-mk avatar Jul 16 '22 08:07 kayman-mk

#604 fixes the TF Docs problem. Can be ignored.

kayman-mk avatar Dec 24 '22 14:12 kayman-mk