VladRassokhin / intellij-hcl

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

terraform: IDE: Missing required properties: resource_group_name where its not expected from terraform #387

Open irrelevanti opened 2 years ago

irrelevanti commented 2 years ago

Prerequisites

Installation details

Terraform Configuration Files

resource "azurerm_lb_probe" "probe-tcp-22" { provider = azurerm.spoke for_each = var.deployments loadbalancer_id = azurerm_lb.lb-external[each.key].id name = "ssh-running-probe" port = 22 }

resource "azurerm_lb_rule" "rule" { provider = azurerm.spoke for_each = var.deployments loadbalancer_id = azurerm_lb.lb-external[each.key].id name = "LBRule" protocol = "Tcp" frontend_port = 22 backend_port = 22 frontend_ip_configuration_name = format("%s-%s",each.value.name,"frontend") backend_address_pool_ids = [azurerm_lb_backend_address_pool.pool[each.key].id] probe_id = azurerm_lb_probe.probe-tcp-22[each.key].id }

Exception

Missing required properties: resource_group_name

Expected Behavior

not require resource_group_name

Actual Behavior

everything is working until i add the resource_group_name which the ide tells me to do. If added there is a terraform error: "unsupported argument "resource_group_name" is not expected here"

Steps to Reproduce

add resource_group_name to resource "azurerm_lb_rule" or "azurerm_lb_probe"