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
This is a little bit of a divergence from what was brought up in #837, but I think it's another avenue for how to solve the problem as described in that issue. This PR introduces a new command: zappa set-environment-variable. I'm a little concerned that the name is over-verbose, but figured I'd err on the side of being as explicit as possible.
For our particular use case, this would be valuable in CI for updating variables we expect in each environment (things like the SHA associated with the release, the time of deployment, etc.), but I can imagine it'd be helpful for a few different reasons.
The command takes three arguments: --key: the key of the environment variable to set --value: the value to set the environment variable to --overwrite: a boolean indicating that, if an environment variable already exists with the provided key, it should be overwritten. In the absence of this flag, a KeyError will be raised. (I'm not that thrilled with using KeyError, but couldn't think of anything better.
Tested as working in 2.7 and 3.6 (and 3.7, with a quick __init__.py tweak, since 3.7 support is coming down the pipeline).
Originally from: Miserlou/Zappa#1731 by youcandanch
TODO
Description
This is a little bit of a divergence from what was brought up in #837, but I think it's another avenue for how to solve the problem as described in that issue. This PR introduces a new command:
zappa set-environment-variable
. I'm a little concerned that the name is over-verbose, but figured I'd err on the side of being as explicit as possible.For our particular use case, this would be valuable in CI for updating variables we expect in each environment (things like the SHA associated with the release, the time of deployment, etc.), but I can imagine it'd be helpful for a few different reasons.
The command takes three arguments:
--key
: the key of the environment variable to set--value
: the value to set the environment variable to--overwrite
: a boolean indicating that, if an environment variable already exists with the provided key, it should be overwritten. In the absence of this flag, aKeyError
will be raised. (I'm not that thrilled with usingKeyError
, but couldn't think of anything better.Tested as working in 2.7 and 3.6 (and 3.7, with a quick
__init__.py
tweak, since 3.7 support is coming down the pipeline).GitHub Issues
Miserlou/Zappa#837
The text was updated successfully, but these errors were encountered: