Skip to content

Bug/4 fix parameter value handling - #5

Merged
tmclaugh merged 2 commits into
mainfrom
bug/4-fix-parameter-value-handling
Jun 27, 2026
Merged

Bug/4 fix parameter value handling#5
tmclaugh merged 2 commits into
mainfrom
bug/4-fix-parameter-value-handling

Conversation

@tmclaugh

Copy link
Copy Markdown
Member

Handle parameter values with spaces and null values (eg. unresolved parameters file variable) correctly.

Fixes #4

tmclaugh added 2 commits June 27, 2026 15:21
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"
@tmclaugh tmclaugh added the bug Something isn't working label Jun 27, 2026
@tmclaugh
tmclaugh marked this pull request as ready for review June 27, 2026 21:07
Copilot AI review requested due to automatic review settings June 27, 2026 21:07
@tmclaugh tmclaugh self-assigned this Jun 27, 2026
@tmclaugh
tmclaugh merged commit efe18b3 into main Jun 27, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-overrides argument string.
  • Emit empty values (Key=) for parameters whose resolved value is null.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread action.yaml
-r '
to_entries |
map("\(.key)=\(.value|tostring)") |
map(if .value == null then "\(.key)=" else "\(.key)=\"\(.value)\"" end) |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix parameter value handling in cfn-parameters.json when value has spaces

2 participants