More expanded parameter overrides #8604
Open
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.
Which issue(s) does this change fix?
This PR adds two enhancements to the parameter override file functionality introduced in #7876:
$includekey support - Dict-based parameter files (YAML/TOML) can now include other files using a special$includekey, providing the same composition capabilities that list-based files already hadWhy is this change necessary?
./config/a.yamland./config/b.yaml), it's unintuitive fora.yamlto referenceb.yamlasfile://config/b.yamlinstead of simplyfile://b.yaml. Relative path resolution makes file organization more natural and maintainable.How does it address the issue?
current_fileparameter to track the file being processed. When afile://reference is encountered, relative paths are resolved againstcurrent_file.parentinstead of the project root.$includekey: Added support for a special$includekey in dict-based parameter files that accepts either a single file path or a list of file paths. I picked this key name because it is not a valid cloudformation parameter so it should be fully backwards compatible. Another option was__includewhich didn't need to be quote-escaped in TOML but overall didn't look as pretty.What side effects does this change have?
This changes how
file://references work for parameter overrides in a way that is not backwards compatible. However, impact is limited since:Mandatory Checklist
PRs will only be reviewed after checklist is complete
make prpassesmake update-reproducible-reqsif dependencies were changedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Documentation
Old and busted
When using
file://to include external parameter overrides, there were limitations to include further levels of nested files. YAML had to be a list:TOML just didn't support it:
New hotness
YAML can now be a dict (if you want) using
$include:Or single file inclusion:
And TOML can now join the party too:
And bring multiple friends: