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

Intrinsic Function Long form to short form after new update #551

Closed
bruceliqin opened this issue Feb 9, 2023 · 6 comments
Closed

Intrinsic Function Long form to short form after new update #551

bruceliqin opened this issue Feb 9, 2023 · 6 comments

Comments

@bruceliqin
Copy link

Parsing the below template functions normally until the recent update to the new GoLang Version:
!Join [!Ref Param1, "Val2"] -> Fn::Join: [Ref: Param1 Val2]

After the new update, it fails to parse the Ref Intrinsic function and outputs the below:
Fn::Join:[Param1 Val2]

@rubenfonseca
Copy link
Contributor

@bruceliqin thank you so much for reporting this. We're a little pressed on time, so one thing that could help us immensely would be to provide us with a snippet of code where you parse a sample template that clearly shows the failing case.

Would you be able to help us with this?

@scottiedog45
Copy link

If someone picks this up, there is some example code on a possibly related issue I posted

@bruceliqin
Copy link
Author

I am using the below code as I would like to preserve the intrinsic functions:

var test map[string]interface{}
opts := &intrinsics.ProcessorOptions{
	NoProcess: true,
}
output, _ := intrinsics.ProcessYAML(testData, opts)

@bruceliqin
Copy link
Author

I am expecting

!Join [!Ref Param1, "Val2"] -> Fn::Join: [Ref: Param1 Val2]

But instead I get Fn::Join:[Param1 Val2]

@bruceliqin
Copy link
Author

Hello, wanted to see if there is any updates on this issue

@rubenfonseca
Copy link
Contributor

Can you please try version 7.8.1 that we just released to see if it fixes the problem?

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

No branches or pull requests

3 participants