VladRassokhin / intellij-hcl

HCL language support for IntelliJ platform based IDEs
Apache License 2.0
244 stars 47 forks source link

Support auto suggest/complete of a complex module input type. #262

Open samart opened 5 years ago

samart commented 5 years ago

Installation details

Terraform Configuration Files

variables.tf:
variable "workspace_obj" {
  type = object({
    name = string
    shortname = string
    resource_group_name = string
    location = string
    log_analytics_id = string
    vnet_name = string
    vnet_id = string
    subnet_id = string
  })

}

main.tf of the module:
resource "azurerm_availability_set" "vm" {
  name = "${local.vm_prefix}-avset"
  location                     = var.workspace_obj.location # location should autosuggest/complete
  resource_group_name          = var.workspace_obj.resource_group_name # resource_group_name should autosuggest/complete

Expected Behavior

location and resource_group_name should suggest and complete. They do not. Terraform however, recognizes the var.obj.attribute dot notation.

Actual Behavior

they are not recognized