Skip to content

feat: opt-in per-key merge of --parameter-overrides with samconfig - #9457

Open
MrOggy85 wants to merge 3 commits into
aws:developfrom
MrOggy85:parameter-overrides-merge
Open

MrOggy85 wants to merge 3 commits into
aws:developfrom
MrOggy85:parameter-overrides-merge

Conversation

@MrOggy85

Copy link
Copy Markdown

When samconfig sets parameter_overrides_merge = true, a --parameter-overrides value given on the command line is merged per key with the samconfig value (command line wins) instead of replacing it. Default behaviour is unchanged.

Which issue(s) does this change fix?

#2380

Why is this change necessary?

--parameter-overrides on the command line replaces parameter_overrides from samconfig entirely. A CI job that needs to add one value (a commit SHA, a secret, a tag) has to repeat every value from the config file.
(#7876 left this out because changing the default would not be backward compatible).

How does it address the issue?

Adds an opt-in samconfig key, parameter_overrides_merge = true. When it is set and --parameter-overrides is given on the command line, the two are merged per key, with the command line winning. It is a callback on the shared --parameter-overrides option, so it applies to every command that has that option. Documented in docs/sam-config-docs.md.

What side effects does this change have?

None unless the key is set; the default behaviour is unchanged. The key exists only in samconfig (no new CLI flag), so it does not appear in --help or in the generated schema. The samconfig page in the AWS SAM Developer Guide would need the same addition.

Mandatory Checklist

PRs will only be reviewed after checklist is complete

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

I used Claude to help write this change. I have reviewed and tested it.

MrOggy85 and others added 3 commits November 19, 2026 06:54
…ws#2380)

When samconfig sets parameter_overrides_merge = true, a --parameter-overrides
value given on the command line is merged per key with the samconfig value
(command line wins) instead of replacing it. Default behaviour is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MrOggy85
MrOggy85 requested a review from a team as a code owner November 20, 2026 04:29
@github-actions github-actions Bot added pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr/external stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant