Repository navigation
Unroll YAML anchors in cloudformation package - #3827
Merged
Merged
Conversation
This updates the YAML dumper for the package command to ignore aliases / anchors. For context, YAML lets you do something like: ```yaml Foo: &anchor Bar: Baz Bin: <<: *anchor Spam: Eggs ``` Which will result in the `Bin` key being a copy of the `Foo` key, but with an additional member `Spam`. CloudFormation won't accept templates that contain these, but they can be useful in the cases where CloudFormation conditions aren't supported, causing you to have to duplicate a resource with one or two changes. With this change users can write their template using anchors and then call package to resolve them along with anything else package needs to do.
JordonPhillips
requested review from
dstufft,
jamesls,
joguSD,
kyleknap and
stealthycoin
January 3, 2019 23:44
stealthycoin
approved these changes
Jan 3, 2019
Codecov Report
@@ Coverage Diff @@
## develop #3827 +/- ##
===========================================
+ Coverage 94.42% 94.42% +<.01%
===========================================
Files 186 186
Lines 14049 14052 +3
===========================================
+ Hits 13266 13269 +3
Misses 783 783
Continue to review full report at Codecov.
|
This was referenced Aug 21, 2019
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This updates the YAML dumper for the package command to ignore aliases
/ anchors. For context, YAML lets you do something like:
Which will result in the
Binkey being a copy of theFookey, butwith an additional member
Spam. CloudFormation won't accepttemplates that contain these, but they can be useful in the cases
where CloudFormation conditions aren't supported, causing you to have
to duplicate a resource with one or two changes.
With this change users can write their template using anchors and then
call package to resolve them along with anything else package needs to
do.
Inspired by #3825