$ terraform plan
Error: Ambiguous attribute key
on main.tf line 21, in resource "aws_instance" "default":
21: var.inventory_tag: "foobar"
If this expression is intended to be a reference, wrap it in parentheses. If
it's instead intended as a literal name containing periods, wrap it in quotes
to create a string literal.
Expected Behavior
Plugin should not suggest to change such interpolations to HCL2 expressions.
Actual Behavior
Plugin is suggesting changes which leads to Terraform error.
Steps to Reproduce
Accept suggested change ‘Convert to HCL2 expression’
Thank you for opening an issue. In this template paragraph text could be removed, however please retain headers.
Prerequisites
Installation details
Help->About->Copy to Clipboard
)IntelliJ IDEA 2020.1.2 (Ultimate Edition) Build #IU-201.7846.76, built on June 1, 2020
[x] intellij-hcl plugin version (
Settings->Plugins
) 0.7.9[x] Terraform version (
terraform -v
) 0.12.26Terraform Configuration Files
After accepting the suggested change:
Exception
Expected Behavior
Plugin should not suggest to change such interpolations to HCL2 expressions.
Actual Behavior
Plugin is suggesting changes which leads to Terraform error.
Steps to Reproduce
terraform plan
command