Doesn't really fit the issue template, but it would be great if CFN YAML templates would allow to use YAML anchors & aliases.
This way one could simply set an anchor and then refer back to it in other places of the template.
Example (non-cfn - only to demonstrate anchors/aliases)
a: &numbers
- 1
- 2
- 3
b: *numbers
is the same as
a:
- 1
- 2
- 3
b:
- 1
- 2
- 3
Advantages:
This would be huge. Not sure why it's not available already.
My use case: I have two stacksets in a parent stack. The stacksets have various configuration properties that should be the same: PermissionModel, AutoDeployment, OperationPreferences, CallAs, Capabilities.
A YAML anchor would be a very simple way to keep this configuration DRY ("don't repeat yourself").
Without an anchor, I think my deduplication options are to use a substack to encapsulate the the common configuration or to generate the deployed template from another source.
In my case I don't want to add that complexity, I really just want to have a single template file (even the stackset template body is defined inline with TemplateBody!).
So for now I have to live with the duplicatation with a comment to the effect of "These settings should be the same for each stack". :smile:
Most helpful comment
This would be huge. Not sure why it's not available already.