feat: Support environment variables for parameters and deploys in rain deploy
#729
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #: #711
Description of changes:
Support sourcing parameters and tags for
rain deployusing prefixed environment variable names.This change adds support within the
rain deploycommand for sourcing values from environment variables. Parameters will be sourced using any variable with a prefix ofRAIN_VAR_andRAIN_DEFAULT_TAG_*for tags.Testing
Confirmed with the addition of new unit tests that all tests are passed.
Exploratory tests performed on the branch are:
Additional Notes
RAIN_as prefix for the tool, thenVARandDEFAULT_TAGas that was what the internal wrapper scripts this feature is based on used. You can see Supportrain deploysourcing parameters & tags from environment variables #711 for a simplified example of this script.DEFAULT_TAGcould be renamed toSTACK_TAGor something else to better reflect its the tags of the stack, and not modifying the template in anyway.config.Debugfwhile others usefmt.Print, I just tried to copy whatever kind of worked, but if we should shift them to standard logging, that works.