Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore backend.hcl and .tfilint.hcl #303

Closed
ryboe opened this issue Apr 11, 2020 · 3 comments
Closed

Ignore backend.hcl and .tfilint.hcl #303

ryboe opened this issue Apr 11, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@ryboe
Copy link

ryboe commented Apr 11, 2020

backend.hcl is used to set up Terraform Cloud.
.tflint.hcl is used to configure tflint.

vscode-terraform currently flags false positive errors in both of these files. Both of these files should be ignored.

Below is a valid backend.hcl file that vscode-terraform is complaining about.
backend.hcl errors
image

Here are similar errors from .tflint.hcl.
image

@tillig
Copy link

tillig commented Apr 14, 2020

This seems somewhat related to #239 where again the issue seems to be that more general HCL files are being parsed as though they're specifically Terraform modules.

@radeksimko
Copy link
Member

Hi folks,
There should no longer be errors or any other diagnostics for either of the two files produced by this extension as it only claims *.tf and *.tfvars files.

As for backend configuration, we track support of that in #636 but I would also point out that from v1.1.0 it is possible to configure Terraform Cloud via the new cloud block.

As for tflint support, we intend to integrate via code actions (tracked under #337 and more broadly under #635). As for highlighting .tflint.hcl files you can now use the HCL extension which we recently updated. We will eventually likely provide some additional basic functionality for HCL configs (which doesn't require schema and other metadata) via that HCL extension, such as hashicorp/vscode-hcl#98.

For any advanced IntelliSense features (completion, hover, etc.) within tflint config files, we do not intend to provide that as part of the Terraform extension nor Terraform LS, since tflint has its own schema (own keywords in its config files). However we'd be happy for anyone to create a dedicated tflint extension and/or language server, which claims .tflint.hcl. That allows all extensions to co-exist and each to keep only the necessary scope. A tflint extension can leverage the HCL extension for highlighting (i.e. let it be installed automatically with tflint extension).

As for building out the language server, we maintain https://github.com/hashicorp/hcl-lang which has still experimental (unstable) API, but is designed to be used to build any HCL2-based language server, such as tflint one.

@radeksimko radeksimko closed this as not planned Won't fix, can't repro, duplicate, stale May 27, 2022
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants