-
Notifications
You must be signed in to change notification settings - Fork 313
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Resolves #1187] Add configuration for inheritance strategies for lis…
…t and dict configs (#1445) Add configuration for inheritance strategies for list and dict configs. This resolves #1187 by allowing selecting a dict_merge strategy at a stack group/stack level, while remaining backwards compatible with existing stacks by retaining the default of child_wins. This does not however address the example from the original issue of including tags of dependencies (or dependents?), as I don't believe this fits with the existing model (or makes sense as a use case). This PR additionally adds the same support to all list and dict based configs. The config for inheritance strategy itself is also inheritable, but not configurable. From the original issue example: Example: Assume Sceptre project A, B and C with dependency C -> B root StackConfig config/config.yaml ``` stack_tags_inheritance: dict_merge stack_tags: - country: US ``` config/prod/A.yaml ``` stack_tags: - city: anaheim # stack A tags are 'city:anaheim', 'country:US' ``` config/prod/C.yaml ``` dependencies: - prod/B.yaml stack_tags: - county: collin # stack C tags are 'county:collin', 'country:US' ``` config/prod/B.yaml ``` stack_tags: # In contrast to original issue example, dependencies do not impact inherited values - city: boston # stack B tags are 'city:boston', 'country:US' ```
- Loading branch information
Showing
5 changed files
with
326 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.