You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.
When the template file includes string such as ${$name}, terraform complains the tf file is incorrect although the error is in the template file.
Error: failed to render : <template_file>:1,4-5: Invalid character; This character is not used within the language., and 1 other diagnostic(s)
on ecs_task.tf line 1, in data "template_file" "hoge":
1: data "template_file" "hoge" {
Terraform Version
Run terraform -v to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.
If you are using Terraform 0.12 then I strongly recommend considering template_file to be deprecated and using the templatefile function instead. Although it's not officially deprecated in the code (because we can't distinguish deprecations between 0.12 and 0.11 while the provider is still cross-compatible), the templatefile function works better because it's integrated into Terraform itself rather than being implemented in a provider.
I believe the templatefile function also reports the problem from the perspective of the function call rather than inside the template file itself. That's a limitation of the fact that template files are not configuration files and are thus not available for use in configuration snippets. Hopefully the presentation of the error is better though, because the function is not forced to marshal its errors through the constraints of the 0.11-compatible Terraform SDK.
When the template file includes string such as ${$name}, terraform complains the tf file is incorrect although the error is in the template file.
Terraform Version
Run
terraform -v
to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.Affected Resource(s)
Terraform Configuration Files
Template file content
tf file content
Debug Output
Panic Output
Expected Behavior
Terraform error points to the template file, not the tf file.
Actual Behavior
Terraform error message is not helpful to identify the cause.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: