Closed amgohan closed 4 years ago
https://github.com/terraform-providers/terraform-provider-template/blob/master/CHANGELOG.md#200-january-14-2019
HCL 2.0 template syntax includes a new %{ ... } construct for control structures, like %{ if a == b } ... %{ endif }. If your existing templates contain any %{ sequences you will need to now escape them as %%{ to ensure correct parsing.
Hi! @mikecook has it right - in the provider v2.0 and later you need to escape %
with as %%
. Thanks!
Thanks, my problem is solved. I didn't notice that in the Changelog.
Hi there,
Terraform Version
terraform version : 0.11.14
Affected Resource(s)
Terraform Configuration Files
main.tf
file.tpl
Debug Output
Expected Behavior
The apply should render the
data.template_file.file.rendered
value correctly as follows:Actual Behavior
generating an error using terraform-provider-template v2.0.0 and above, but working fine in v1.0.0
* data.template_file.file: data.template_file.file: failed to render : <template_file>:2,3-6: Invalid template control keyword; "bar" is not a valid template control keyword. Did you mean "for"?
Steps to Reproduce
terraform init && terraform apply