hashicorp / terraform-provider-template

Terraform template provider
https://www.terraform.io/docs/providers/template/
Mozilla Public License 2.0
131 stars 89 forks source link

Update for Terraform 0.12 and use HCL2 instead of HIL #43

Closed apparentlymart closed 5 years ago

apparentlymart commented 5 years ago

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: