-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
Gomplate not preserving AWS-specific custom YAML tags on merge #1997
Comments
Hi @greg-caffeine, sorry for the delay. Custom YAML tags are something that are going to be pretty difficult to support with gomplate. The main problem is that internally the data is parsed into an intermediate form which is a map with nested maps, and so something like the above would be parsed into (in JSON terms) You may be able to accomplish this if you instead reframe the approach and build a template out of |
Hmm... There may actually be a possibility to use a different intermediate format, as hinted at by go-yaml/yaml#191 (comment), but it's unclear exactly how. I'd need to find some time to dig into this deeper. |
This issue is stale because it has been open for 60 days with no If it's still relevant, one of the following will remove the stale
|
I would like to use gomplate to allow overriding and merging of sections of CloudFormation YAML templates with other YAML sections defined in other files by using the gomplate
merge
datasource. Unfortunately, gomplate drops the AWS-specific YAML tags in the merged output, breaking the template.Example:
cloudfront_template.yaml:
cloudfront_overrides.yaml:
Gomplate Command
% gomplate -d 'merger=merge:cloudfront_template.yaml|cloudfront_overrides.yaml' -i '{{ include "merger" }}'
OUTPUT
Note in the output that
MY_PARAMETER: !Ref MyParameter
has not been preserved and instead has been transformed intoMY_PARAMETER: MyParameter
, losing the!Ref
tag.Is there any way to get gomplate to preserve all HTML tags in the output, or to provide a list of tags to preserve?
A list of AWS custom tags can be found here.
The text was updated successfully, but these errors were encountered: