-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add a way to run cfn-lint on Cloudformation templates that use Handlebars templating #456
Comments
Thanks for your request! The implementation isn't as easy as one might expect because the stack templates can contain elements that are resolved only at the time of deployment. For example, there can be a hooks that expose some data that is used with handlebars to dynamically build the final template. Another thing is that stacks usually depend on other stacks which means the final template contents can't be known before the dependencies have been deployed. Due to these facts, emitting the templates could sometimes lead to unexpected results. Anyway, I agree feature would be very useful, and I will try to find a way to implement it. |
The implementation is now done. Once integration tests are ready, we can release this feature |
That was really quick, thank you! I tested the branch version and I can now do that I wanted to do via:
|
Thanks for testing this feature :) . I'll try to get the release out by the end of this week. |
🎉 This issue has been resolved in version 7.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
We use Takomo and have a couple of stacks where we need to use the Handlebars templating feature. We also want to check the CloudFormation templates using
cfn-lint
in a CI job. We have not been able to find a good way to run the linter for the stacks where the CloudFormation templates that need Handlebars. Currently, we have resorted to writing template files that validate as both CloudFormation and Handlebars templates, so we get the linting results for parts that do not have any Handlebars templating. However, such templates are very tricky to write, restrict how we can leverage Handlebars, and are not validated for the parts that are generated with Handlebars. Could you consider adding something to make it easier to support this use case?Some ideas:
takomo templates validate [template-path]
, which processes the templates and runscfn-lint
on themcfn-lint
dependency created by that approach is too hard, something liketakomo templates emit [template-path]
, which processes the templates and emits them, so that the user (or IDE plugin, or CI) can runcfn-lint
on the result.The text was updated successfully, but these errors were encountered: