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

Initialised module from GitHub not being recognised #1915

Closed
1 task
madi-parloa opened this issue Dec 10, 2024 · 2 comments · Fixed by hashicorp/terraform-ls#1903
Closed
1 task

Initialised module from GitHub not being recognised #1915

madi-parloa opened this issue Dec 10, 2024 · 2 comments · Fixed by hashicorp/terraform-ls#1903
Labels
bug Something isn't working

Comments

@madi-parloa
Copy link

Extension Version

v2.34.0

VS Code Version

Version: 1.95.3 (Universal)
Commit: f1a4fb101478ce6ec82fe9627c43efbf9e98c813
Date: 2024-11-13T14:50:04.152Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Darwin arm64 23.6.0

Operating System

macOS Sonoma Version 14.7 Apple M3 Pro

Terraform Version

Terraform v1.10.1 on darwin_arm64

Steps to Reproduce

  1. Add this module to your main.tf file:
module "alias_no_refresh" {
  source = "git::https://github.com/terraform-aws-modules/terraform-aws-lambda.git//modules/alias"

  refresh_alias = false
  name          = "current-no-refresh"
}
  1. Run teraform init or terraform get
  2. Hover on refresh_alias

Expected Behavior

Should show a popup with information about this input variable

Actual Behavior

No popup. HashiCorp Terraform Extension output logs show:

2024/12/10 22:03:38 opts.go:215: Received request batch of size 1 (qlen=0)
2024/12/10 22:03:38 opts.go:215: Dequeued request batch of length 1 (qlen=0)
2024/12/10 22:03:38 rpc_logger.go:32: Incoming request for "textDocument/hover" (ID 99): {"textDocument":{"uri":"file:///Users/<redacted>/Documents/<redacted>/<redacted>-infra/<redacted>/modules/main/main.tf"},"position":{"line":26,"character":4}}
2024/12/10 22:03:38 hover.go:41: Looking for hover data at "main.tf" -> hcl.Pos{Line:27, Column:5, Byte:522}
2024/12/10 22:03:38 hover.go:43: received hover data: (*lang.HoverData)(nil)
2024/12/10 22:03:38 rpc_logger.go:48: Error for "textDocument/hover" (ID 99): [-32098] main.tf (27,5): unknown attribute "refresh_alias"
2024/12/10 22:03:38 opts.go:215: Completed 1 requests [3.703208ms elapsed]
[Error - 10:03:38 PM] Request textDocument/hover failed.
  Message: main.tf (27,5): unknown attribute "refresh_alias"
  Code: -32098 

Terraform Configuration

No response

Project Structure

No response

Gist

No response

Anything Else?

I also tried doing the same on GitHub Codespaces with the same results.

Workarounds

#1440 (comment)

References

Help Wanted

  • I'm interested in contributing a fix myself

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@madi-parloa madi-parloa added the bug Something isn't working label Dec 10, 2024
@dbanck
Copy link
Member

dbanck commented Dec 13, 2024

Hi @madi-parloa,

Thanks for the report! I'm able to reproduce the problem. I'm sure it's worked before, as I've used your example in the past when working on hashicorp/terraform-ls#1760.

Bisecting 0.34.0 and the current language server version shows that hashicorp/terraform-ls@0a91911 is the first bad commit where things stopped working. I or someone else on the team will look into this.

@ansgarm
Copy link
Member

ansgarm commented Dec 20, 2024

Hi everyone!

We released version 2.34.2 of the extension which should fix this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants