-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature request: append stack_tag inheritance #1187
Comments
Implementation on this should be fairly easy; Simply using the |
I was thinking about - maybe adding this stack_tags: block at config.yaml level - it would apply automatically tags to all resources under a project/folder; without the need to add this block on each yaml cfn definition. |
@include That already works in Sceptre. The challenge is when you want to mix tags in your deeper configs with higher level configs. Right now, the deeper configs override the higher level ones. |
Bumping this topic, I've very interested in this use-case as it would be very valuable for projects I work on (things like tags that are the same for a set of environments, but need to be extended down at each stack group). I agree that changing the default strategy would be a big challenge, and would cause untold problems for existing configurations - not worth the trouble at all IMO. To that end I feel that allowing the strategy to be defined by the config would be a better solution overall, not just for mitigating the problem of having to change the default behaviour. The example here would be like stack_tags_inheritance: dict_merge
stack_tags:
tag_1: value_1
tag_2: value_2 This could easily be applied to other merge-able config keys as well. |
…for list and dict configs (Sceptre#1187)
…for list and dict configs (Sceptre#1187)
I've put up a PR to add this feature for consideration. I realised late that the original issue here indicates some inheritance of tags from dependants ( |
…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' ```
Currently stack_tags inheritance strategy is override which means that stack tags can be defined in a Sceptre StackGroup and then overridden in the a child StackGroup or Stack config. I would like to make a feature request to append stack_tags on a dependencies.
Example:
Assume Scepter project A, B and C with dependency C -> B
root StackConfig config/config.yaml
config/prod/A.yaml
config/prod/C.yaml
config/prod/B.yaml
The text was updated successfully, but these errors were encountered: