aws-samples / aws-health-aware

AHA is an incident management & communication framework to provide real-time alert customers when there are active AWS event(s). For customers with AWS Organizations, customers can get aggregated active account level events of all the accounts in the Organization. Customers not using AWS Organizations still benefit alerting at the account level.
MIT No Attribution
344 stars 140 forks source link

Remove deprecated template_file call #57

Open labrown opened 1 year ago

labrown commented 1 year ago

The template provider is deprecated by Hashicorp. Remove the data resource calling the template function and use calls to the builtin file function in the lambda_zip resource.

Issue #56:

Remove the template_file t_file data resource which uses the template function and update the lambda_zip resource to call the file function to get the lambda script contents directly.

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

elementalvoid commented 10 months ago

I added the following comment to issue #64 but am copying it here for more visibility...


40, #57, and #65 have all been created to fix this. All three have slightly different solutions.

At a glance, #57 fixes it the cleanest way.

The source_files are not templates and do not need to be rendered in any way. I don't know why it was done that way in the beginning, but #40 continues to treat them as templates though it does switch to the built-in function. #65 removes the templating but is more complex using the local_file data source.