Vscode-terraform: Enable Terragrunt support

Created on 1 Nov 2019  路  4Comments  路  Source: hashicorp/vscode-terraform

I'm not sure if this is a language server issue, a plugin issue, or maybe a little of both.

Terragrunt allows some extra directives in HCL files like specifying remote_state (example).

If HCL is set to be a Terraform document, you get an error if you define remote_state - Blocks of type "remote_state" are not expected here.

remote_state isn't the only thing that gets caught, it's just an example.

It'd be nice if these files could be handled in a way that allows Terragrunt directives to work. By convention they're always called terragrunt.hcl so there could be a naming standard set up by which those files are the only ones that get the extra treatment.

Is this the right place to ask for that?

enhancement

Most helpful comment

Screen Shot 2020-01-17 at 08 54 53
I'm also running into this problem. It'd be really nice if there was a way to suppress these errors for .hcl files.

All 4 comments

The same thing is for inputs in terragrunt.hcl and terraform.tfvars file
image

Screen Shot 2020-01-17 at 08 54 53
I'm also running into this problem. It'd be really nice if there was a way to suppress these errors for .hcl files.

Perhaps there needs to be a different manner of parsing between .hcl and .tf files - like, if it's .tf, parse it as Terraform; but if it's .hcl, allow the more generalized Hashicorp Config Language to work.

Looks like PR #265 has an update to stop treating HCL as Terraform.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

QuinnStevens picture QuinnStevens  路  6Comments

vfab picture vfab  路  4Comments

avinashkavi447 picture avinashkavi447  路  7Comments

domenjesenovec picture domenjesenovec  路  6Comments

okgolove picture okgolove  路  4Comments