aws-cloudformation / cloudformation-pkl

Apache License 2.0
9 stars 2 forks source link

Add more intrinsic functions #8

Closed henriqueleite42 closed 2 weeks ago

henriqueleite42 commented 3 weeks ago

Description of changes

Adds the following intrinsic functions:

I didn't include the flowing functions because of the warning in the image below, I don't know how it affects the template, but I can add them latter if they are applied on the same way that the other functions. Image

Also, didn't add Fn::Transform because it's my first day working with Pickle, and I'm not sure how to implement the Parameters.

And finally, I didn't alter Sub to include the variables because I'm not sure about how to test these changes and if they will break something, I must warn that the changes in this PR were not tested and are only theoretical.

Disclaimer

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

ericzbeard commented 2 weeks ago

I'm going to merge this, but it does have me thinking about how we can better test things. I have several informal test templates in the repo, and the scripts/pkl-patterns.sh script, but we should probably add something more thorough that runs cfn-lint on the output to make sure it's still valid.

henriqueleite42 commented 2 weeks ago

Hey @ericzbeard, maybe we could add an GitHub Action that runs your script to make sure that it's working, if you agree, I can create another PR to implement this.

Another great alternatives (or complements) would be:

What do you think?