You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like env-aws-params to run the target command as-is if the prefix and region are not set.
Conditions
Neither the --aws-region flag nor the AWS_REGION environment variable are set.
Neither the --prefix flag nor the PARAMS_PREFIX environment variable are set.
Current Behavior
Program aborts and does execute target command.
$ env-aws-params service
ERROR: prefix is required
Desired Behavior
Program warns of missing variables and executes target command without retrieving variables.
$ env-aws-params --ignore-no-config service
WARNING: SSM variables not set
Why
I'm conditionally using env-aws-params in a Docker entrypoint script to execute the Docker command as-is if neither the PARAMS_PREFIX and AWS_REGION variables are set. This allows me to use the same container in both production and a fully local environment; the container won't reach out to SSM unless both previous mentions env vars are set.
The entrypoint script is fairly generic as it only inspects variables used by env-aws-params. However, it ends up becoming a copy/paste snippet of code that gets carried around to multiple projects. It also must be an external file to be able to safely pass "$@" to it.
I would like env-aws-params to run the target command as-is if the prefix and region are not set.
Conditions
--aws-region
flag nor theAWS_REGION
environment variable are set.--prefix
flag nor thePARAMS_PREFIX
environment variable are set.Current Behavior
Program aborts and does execute target command.
Desired Behavior
Program warns of missing variables and executes target command without retrieving variables.
Why
I'm conditionally using env-aws-params in a Docker entrypoint script to execute the Docker command as-is if neither the
PARAMS_PREFIX
andAWS_REGION
variables are set. This allows me to use the same container in both production and a fully local environment; the container won't reach out to SSM unless both previous mentions env vars are set.The entrypoint script is fairly generic as it only inspects variables used by env-aws-params. However, it ends up becoming a copy/paste snippet of code that gets carried around to multiple projects. It also must be an external file to be able to safely pass
"$@"
to it.Solution
Add a command-line flag to env-aws-params to do essentially the same thing.
I don't have a preference how this option is set; the name
--ignore-no-config
was picked without much thought put into it.If you're open to including this, I'll glady take on development.
The text was updated successfully, but these errors were encountered: