Bug/4 fix parameter value handling - #5
Merged
Conversation
By the time this was being passed to SAM CLI null was being interpreted as a string. This behavior preceded the previous fix for handling values with spaces. Now we get: * null: key= *non-null: key="value"
There was a problem hiding this comment.
Pull request overview
Updates the GitHub Action’s CloudFormation parameter processing so sam deploy --parameter-overrides can correctly receive parameter values that contain spaces and parameters that resolve to null (e.g., unresolved variables in the parameters jq filter).
Changes:
- Wrap non-null parameter values in quotes when building the
--parameter-overridesargument string. - Emit empty values (
Key=) for parameters whose resolved value isnull.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| -r ' | ||
| to_entries | | ||
| map("\(.key)=\(.value|tostring)") | | ||
| map(if .value == null then "\(.key)=" else "\(.key)=\"\(.value)\"" end) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Handle parameter values with spaces and null values (eg. unresolved parameters file variable) correctly.
Fixes #4