VladRassokhin / intellij-hcl

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

Bug: google_container_node_pool - plugin tries to create workload_metadata_config block inside node_config with node_metadata attribute as being required #394

Open luis-guimaraes-exoawk opened 2 years ago

luis-guimaraes-exoawk commented 2 years ago

Prerequisites

Installation details

Kotlin: 221-1.6.21-release-337-IJ5591.52 Current Desktop: KDE

 - [x] intellij-hcl plugin version: `221.5591.19`
 - [x] Terraform version
 ```text
Terraform v1.2.3
on linux_amd64
+ provider registry.terraform.io/hashicorp/google v4.25.0
+ provider registry.terraform.io/hashicorp/helm v2.6.0
+ provider registry.terraform.io/hashicorp/kubernetes v2.11.0
+ provider registry.terraform.io/hashicorp/local v2.2.3

Terraform Configuration Files

resource "google_container_node_pool" "gke_node_pool" {
  (...)
  node_config {
    (...)
    workload_metadata_config {
      mode = ""
    }
  }
(...)
}

Expected Behavior

It should create the block with the mode attribute as stated in the documentation and the provider source code: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster#nested_workload_metadata_config https://github.com/hashicorp/terraform-provider-google/blob/0baa871ae8f0cadef4feeeff730ee021ae114154/google/node_config.go#L277

Actual Behavior

It created the block with a non existent argument that it says is required.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Auto complete a workload_metadata_config block

Image: image