Terraform Interpolation Syntax Highlighted as Syntax Error in Pycharm
See original GitHub issueInstallation details
-
IDE version (
Help->About->Copy to Clipboard
) PyCharm 2018.1.4 (Professional Edition) Build #PY-181.5087.37, built on May 24, 2018 Licensed to Tarun Tomar Subscription is active until July 6, 2018 JRE: 1.8.0_152-release-1136-b39 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o macOS 10.13.5 -
intellij-hcl plugin version (
Settings->Plugins
) 0.6.11 -
Terraform version (
terraform -v
) 0.11.7
Terraform Configuration Files
key_name = "${format("%s-Bastion-%s", var.ProjectName, var.RegionName)}"
Exception
Should not highlight any errors.
Expected Behavior
PyCharm should not highlight any error
Actual Behavior
Throws syntax error. Making the remaining code styling/highlights fail.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
- use the terraform interpolation to format a a variable value using couple of other variables, such as:
var1 = “abc” var2 = “${format(”%s", var.var1)}"
Upon hovering the mouse to the highlighted syntax error, it reads:
',' or '}' expected, got '%'
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Terraform and HCL - IntelliJ IDEs Plugin - JetBrains Marketplace
Adds syntax highlighting for HCL and HIL files. ... Interpolation Language (HIL), as well as their combination used in Terraform configuration files (.tf)....
Read more >Terraform interpolation syntax error for data template_file
Either way, it seems like the syntax error is on line 280 column 49 of your handler.js file and is caused by Terraform's...
Read more >awesome-vscode | A curated list of delightful VS Code ...
A curated list of delightful VS Code packages and resources.
Read more >An Introduction to Terraform - Gruntwork Blog
This blog post corresponds to Chapter 2 of Terraform Up & Running, “An Intro to Terraform Syntax,” so look for the code samples...
Read more >SweetOps #terraform for April, 2020
Anyone else using pycharm and the HCL plugin for terraform work? ... Hello, I am using Vscode and was looking for syntax highlight...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok. If you spot some problems don’t hesitate to open new issues.
Hi,
Thanks for all your responses and time and effort for this awesome plugin.
I had associated the *.tf with HCL Interpolation Language and hence the syntax issue.
All seems to be working fine now.