You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I broke apart my full json template into individual snippets: Metadata, Parameters, Mappings, Conditions, Resources, Outputs. Then tried to use rain to merge them. rain merge --debug tm-standalone-2025.1-14v1.metadata.json tm-standalone-2025.1-14v1.parameters.json tm-standalone-2025.1-14v1.mappings.json tm-standalone-2025.1-14v1.conditions.json tm-standalone-2025.1-14v1.resources.json tm-standalone-2025.1-14v1.output.json --output tm-standalone-2025.1-14v1.MERGED.json
This resulted in an error:
panic: yaml: line 1936: did not find expected '-' indicator [recovered]
panic: yaml: line 1936: did not find expected '-' indicator
I cannot share my CF Template at all. There are just way too many things company specific in there. What I am doing is very simple. I have a Full template with all the major sections in it like so:
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "SaaS Standalone Deployment (v2025.1-14 2025-1-14v1)",
"Metadata": {},
"Parameters": {},
"Mappings": {},
"Conditions": {},
"Resources": {}
}
I then take the different sections as listed above like “Metadata”: {} and put that in one file called template-metadata.json. And I do the same thing with the other sections. I ignored the lines “AWSTempateFormatVersion”: and “Description”:.
Then I ran rain merge and listed out all the individual files in the command. And got the error I sent in. My guess is that rain tried to do a validate on the files but since the files were only snippets of json not a full json file rain bombed out.
As a side note I did happen to find this ruby gem called MKStack. It was able to take the same files, merge them into one output file. I tested that output buy building an instance in AWS with the template and it worked. So, whatever it is doing Rain should do.
Let me know if you need more information. I will try to provide what I can for you.
Louis
From: Eric Z. Beard ***@***.***>
Date: Thursday, January 30, 2025 at 17:00
To: aws-cloudformation/rain ***@***.***>
Cc: Louis Bohm ***@***.***>, Author ***@***.***>
Subject: Re: [aws-cloudformation/rain] Cannot merge json template snippets (Issue #635)
Rain does support json. Can you share the content of the files? Or a simplified set of files that reproduces the error?
—
Reply to this email directly, view it on GitHub<#635 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAGOYCS36IMFXQVZYYTH53L2NKOJLAVCNFSM6AAAAABWDCWTDCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMRVGY4DMOBTGA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
I broke apart my full json template into individual snippets: Metadata, Parameters, Mappings, Conditions, Resources, Outputs. Then tried to use rain to merge them.
rain merge --debug tm-standalone-2025.1-14v1.metadata.json tm-standalone-2025.1-14v1.parameters.json tm-standalone-2025.1-14v1.mappings.json tm-standalone-2025.1-14v1.conditions.json tm-standalone-2025.1-14v1.resources.json tm-standalone-2025.1-14v1.output.json --output tm-standalone-2025.1-14v1.MERGED.json
This resulted in an error:
Does rain not support json template files?
The text was updated successfully, but these errors were encountered: