hashicorp / vscode-terraform

HashiCorp Terraform VSCode extension
https://marketplace.visualstudio.com/items?itemName=HashiCorp.terraform
Mozilla Public License 2.0
924 stars 179 forks source link

Intellisense not displaying all items #1613

Closed eliassal closed 11 months ago

eliassal commented 11 months ago

Extension Version

v2.28.2

VS Code Version

Version 1.83.1

Operating System

Windows 10 64bit

Terraform Version

v1.6.2

Steps to Reproduce

  1. Fire VSC
  2. Create main.tf
  3. add terraform....
  4. add provider
  5. type resource
  6. Ctrl + space
  7. A long list displayed but no azurerm_rersource_group item
  8. Ok, I enter manually azurerm_rersource_group then beside it the name
  9. inside curly brackets I do Ctrl + space
  10. A list displayed missing name, location......but I can see count, atlas,fore.....

Expected Behavior

See all items required by a resource in intellisens

Actual Behavior

Items missing in intellisense

Terraform Configuration

terraform {
  required_version = ">=1.6.2"
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "~>3.78.0"
    }
  }
}

provider "azurerm" {
  features {}
  skip_provider_registration = true

}

resource "azurerm_rersource_group" "rg" {

}

Project Structure

Only main.tf in the directory and I did a tf init so there is a directory .terraform and a file .terrafofm.lock.hd

Gist

No response

Anything Else?

No response

Workarounds

No response

References

No response

Help Wanted

Community Note

dbanck commented 11 months ago

Hi @eliassal,

there is no resource called azurerm_rersource_group in the azurerm provider. Did you mean azurem_resource_group (without the r)?

It should show up in the resource autocompletion

CleanShot 2023-10-30 at 16 45 17@2x

and completing the attributes should work, too

CleanShot 2023-10-30 at 16 49 21@2x
eliassal commented 11 months ago

So many thanks dbanck, my bad, dont know wht there was an additional r, now it is working fine as expected

radeksimko commented 11 months ago

Glad it's now working for you! 👍🏻

github-actions[bot] commented 10 months ago

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.