It certainly does but the HCL2 linter still is in beta at best. I'm not contributing to the code base but I am throwing some effort behind the testing at
https://github.com/mauve/vscode-terraform/issues/157There's also an active bounty on Bountysource for Julio who's actively building HCL2 support (I really don't want to use PyCharm _just_ for Terraform.
https://www.bountysource.com/issues/70767330-feat-terraform-0-12-support-was-hcl2-support
Syntax errors will still be found when using for each loops and variables. E.g, the Jonny variable below shows syntax errors in VSCode.
variable "some-accounts" {
description = "A map of the ARN's of the listed accounts Role and SAML Provided objects"
type = list(object({
username = string
firstname = string
lastname = string
}))
Jonny = {
username = "myemail@domain.com"
firstname = "Bob, The"
lastname = "Builder"
}
The ```var.some-accounts``` also spits out a syntax error below, as does ```each.key```
for_each = var.some-accounts
resource "okta_app_saml" "Okta_App" {
for_each = var.aws-accounts
label = each.key
sso_url = "https://signin.aws.amazon.com/saml"
recipient = "https://signin.aws.amazon.com/saml"
destination = "https://signin.aws.amazon.com/saml"
audience = "https://signin.aws.amazon.com/saml"
subject_name_id_template = "$${user.userName}"
subject_name_id_format = "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"
response_signed = true
signature_algorithm = "RSA_SHA256"
digest_algorithm = "SHA256"
honor_force_authn = false
authn_context_class_ref = "urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport"
}