Skip to content
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

Cannot merge json template snippets #635

Open
Systemgeek-louis opened this issue Jan 29, 2025 · 2 comments
Open

Cannot merge json template snippets #635

Systemgeek-louis opened this issue Jan 29, 2025 · 2 comments
Assignees

Comments

@Systemgeek-louis
Copy link

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

goroutine 1 [running]:
github.com/aws-cloudformation/rain/internal/cmd.execute.func1()
github.com/aws-cloudformation/rain/internal/cmd/wrap.go:77 +0x15e
panic({0x108333640?, 0xc0006278b0?})
runtime/panic.go:785 +0x132
github.com/aws-cloudformation/rain/internal/cmd/merge.init.func1(0xc0001ba500?, {0xc0001a46c0, 0x6, 0x1070a656d?})
github.com/aws-cloudformation/rain/internal/cmd/merge/merge.go:48 +0x2a5
github.com/spf13/cobra.(*Command).execute(0x10a0b3960, {0xc0001a4630, 0x9, 0x9})
github.com/spf13/[email protected]/command.go:989 +0xa91
github.com/spf13/cobra.(*Command).ExecuteC(0x10a0b0880)
github.com/spf13/[email protected]/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/[email protected]/command.go:1041
github.com/aws-cloudformation/rain/internal/cmd.execute(0xc000112060?)
github.com/aws-cloudformation/rain/internal/cmd/wrap.go:86 +0x4d
github.com/aws-cloudformation/rain/internal/cmd.Execute(0xc0000061c0?)
github.com/aws-cloudformation/rain/internal/cmd/wrap.go:95 +0x13
main.main()
github.com/aws-cloudformation/rain/cmd/rain/main.go:23 +0x1a

Does rain not support json template files?

@ericzbeard
Copy link
Contributor

Rain does support json. Can you share the content of the files? Or a simplified set of files that reproduces the error?

@Systemgeek-louis
Copy link
Author

Systemgeek-louis commented Jan 31, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants