The main goal of this PR is to switch from HIL to HCL2 templates, and thus allow the new HCL2 template features to be used. This fixes #1.
The two languages are broadly compatible, but this is still a potential breaking change for existing templates due to the introduction of the %{ ... } control sequence syntax for conditional and repeated blocks.
Because Terraform 0.12 introduces a templatefile function that subsumes all of the functionality of template_file, the docs for that data source are now becoming a big advertisement for that feature, though the data source is retained for Terraform 0.11 users and to allow for the very unusual situation where someone might want to render a template coming from somewhere other than local disk. (That situation is rare and not really advisable, so the docs don't mention it at all but instead leave users to discover it for themselves.)
This PR also includes some other breaking changes we've been waiting to implement:
Remove the long-deprecated filename argument from template_file. (Fixes #20.)
Require base64 encoding when gzip is enabled in template_cloudinit_config, which ensures the result is always valid UTF-8 and thus prevents silent corruption of data in 0.11 and noisy validation failures in 0.12.
The main goal of this PR is to switch from HIL to HCL2 templates, and thus allow the new HCL2 template features to be used. This fixes #1.
The two languages are broadly compatible, but this is still a potential breaking change for existing templates due to the introduction of the
%{ ... }
control sequence syntax for conditional and repeated blocks.Because Terraform 0.12 introduces a
templatefile
function that subsumes all of the functionality oftemplate_file
, the docs for that data source are now becoming a big advertisement for that feature, though the data source is retained for Terraform 0.11 users and to allow for the very unusual situation where someone might want to render a template coming from somewhere other than local disk. (That situation is rare and not really advisable, so the docs don't mention it at all but instead leave users to discover it for themselves.)This PR also includes some other breaking changes we've been waiting to implement:
filename
argument fromtemplate_file
. (Fixes #20.)template_cloudinit_config
, which ensures the result is always valid UTF-8 and thus prevents silent corruption of data in 0.11 and noisy validation failures in 0.12.