Closed MatthiasScholzTW closed 3 years ago
Hi Matthias! Thank you for using Summon! I'm sorry you're having trouble getting the string interpolation to work, I recommend trying something like this:
$ summon -p <provider> /bin/bash -ec 'echo $FOO'
In your example above (summon --provider <your_provider_of_choice> echo "${MY_TEST_VAR}"
), your shell will be performing the string interpolation before Summon can. When using double quotes around a variable, your current shell will attempt to read MY_TEST_VAR
, while the value only exists in the summon subshell.
You can read a bit more about this in our troubleshooting guide here! Please let us know if this helps, and if you have any further questions!
Bradley
Summary
Using summon to fill parameter in the command line parameter is not working.
This is probably a misunderstanding of the usability of summon, but maybe there is a possibility on how to make this use case work.
Steps to Reproduce
Steps to reproduce the behavior:
MY_TEST_VAR: !var /test/my_test
in yoursecrets.yml
summon --provider <your_provider_of_choice> echo "${MY_TEST_VAR}"
A similar use case is to use it with
curl
summon --provider <your_provider_of_choice> curl -H "X-API-KEY: ${MY_TEST_VAR} ...
Expected Results
The content of the variable is available to run the command.
Actual Results (including error logs, if applicable)
The result is empty
Reproducible
Version/Tag number
Environment setup