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

Variables (auto suggest/Peak) #191

Closed
msaraceno opened this issue Jun 26, 2020 · 4 comments
Closed

Variables (auto suggest/Peak) #191

msaraceno opened this issue Jun 26, 2020 · 4 comments

Comments

@msaraceno
Copy link

Prior 2.0.0 extension when referencing a variable in a resource block it would use intellisense and suggest variables that were declared, this no longer happens also if you hovered your mouse over a variable that you set in a resource block it would show the value of the variable. These were both useful features. This only worked when you used TF <=0.11.14 syntax. I am running extension 2.0.2. I would like this feature to be supported with Terraform 0.12.x

@radeksimko radeksimko transferred this issue from hashicorp/vscode-terraform Jun 26, 2020
@radeksimko radeksimko added the enhancement New feature or request label Jun 26, 2020
@radeksimko
Copy link
Member

Hi @msaraceno
This sounds like a feature that would better be implemented on the language server side - which is why I transferred the issue here.

Just to clarify - are you looking for completion for variable references? e.g.

resource "bla_blah" "name" {
  attribute = var.<HERE>
}

If so then that's something we do plan to implement as part of #38

Hover support is something we do plan to support and showing value of the variable on hover sounds like a great idea - I added that to #87 (comment) which is our canonical issue for hover support.

@msaraceno
Copy link
Author

Hi @radeksimko yes suggestions for completion of variable references like your example, these could be references to other resources as well for example if referencing a module or a data resource it should list available options and narrow down as you type.

module "foo" {
  source = "app.terraform.io/org/workspace"
  verion = "0.0.1"
}

resource "bla_blah" "name" {
  attribute = module.<foo>.attribute
}

@radeksimko
Copy link
Member

Initial support for references was added in (now merged) #485 which will be released in coming days. The same PR also includes some description of features added and links to follow-up issues covering features which were omitted from that initial PR.

With that in mind I'm going to close this issue - do keep an eye out for the upcoming update (0.17.0).

@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 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants