Unknown token: IDENT string
See original GitHub issueI am using vscode-terraform 1.3.11 with this Terraform configuration:
variable "prefix" {
type = string
}
That is producing this error in the PROBLEMS tab:
Unknown token: 2:10 IDENT string [2,10]
As far as I can tell from the Terraform Documentation, this should be valid.
If I run the same code through terraform validate
and tflint
, I get no reported errors:
$ terraform validate
Success! The configuration is valid.
$ tflint
Awesome! Your code is following the best practices :)
$ terraform --version
Terraform v0.12.0
+ provider.aws v2.12.0
$ tflint --version
TFLint version 0.8.0
I have both terraform.lintPath
and terraform.path
set to point to the correct versions of terraform
and tflint
.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:17
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Unknown token IDENT aws_region - terraform - Stack Overflow
This error appears when you execute terraform 0.12upgrade and your code syntax is already in Terraform 0.12x or obviously a mix of syntax ......
Read more >Getting errors when I run Terraform on VS Code: Unknown ...
The type = string for variable “resource_group_name” gets this error message: Unknown token:4:20 IDENT string [4,20] I cannot figure out how ...
Read more >Why can't I validate my Terraform template? - IBM Cloud Docs
Error: Error parsing /file-path/main.tf: At 9:14: Unknown token : 9:14 IDENT var.resource_group. The Terraform version that you specify during the ...
Read more >Unknown token: IDENT , when decoding/parsing terraform file
I am parsing main.tf file , so that I can use the arguments passed into the module in my go lang program. Terraform...
Read more >hashicorp-terraform/Lobby - Gitter
If I comment out the type = map(string) line: Error while parsing: At 42:26: Unknown token: 42:26 IDENT merge. not really sure why...
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 Free
Top 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
This bug still happens in version 1.4.0 with lsp server
Having this issue as well, code runs but VScode gives me an error (Unkown token: IDENT string).