feat: support merging object/map attributes #10
Merged
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.
Allows optionally merging map keys in block attributes whose value is a map. When unset/false (which is the default), the two maps that will be merged will be overridden with the second map value. When set to true, the keys of the maps will be merged. In other words, for now merging is one level deep given how attributes are represented in HCL, which is a list of tokens. This could eventually be expanded to do a recursively merge on the map values, but this is left out for now.
The interface is non-breaking, since the exported TS
merge
function optionally allows options to be set. Should behave as normal.On top of the added functionality, the changes include:
Merge
function.