This is an example workaround for getting Terraform input variables when you won't have jq
available in the executing machine.
Uses sed
to parse the input JSON to extract a certain key from the input JSON.
Warning: this hasn't really been well-tested, it will pretty much work only with string values and will likely break for strings that have quotes. Might give you an idea of how to improve it for your implementation though.
eval "$(jq -r '@sh "MY_BASH_VARIABLE=\(.my_bash_variable)"')" echo "MY_BASH_VARIABLE is ${MY_BASH_VARIABLE}"