VladRassokhin / intellij-hcl

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

kubernetes_pod_security_policy not recognized as valid resource #328

Closed albuch closed 3 years ago

albuch commented 3 years ago

Thank you for opening an issue. In this template paragraph text could be removed, however please retain headers.

Prerequisites

Installation details

Terraform Configuration Files

terraform {
  required_version = "~> 0.14"
  required_providers {
    kubernetes = {
      version = "~> 2.0"
      source = "hashicorp/kubernetes"
    }
  }
}

provider "kubernetes" {
  config_path    = "~/.kube/config"
}

resource "kubernetes_pod_security_policy" "test" {
  metadata {
    name = "test"
    annotations =  {
      "apparmor.security.beta.kubernetes.io/allowedProfileNames" : "unconfined"
    }
  }
  spec {
    privileged = false
    allow_privilege_escalation = false
    read_only_root_filesystem = true
    host_network = true
    host_pid = true

    allowed_host_paths {
      path_prefix = "/dev/log"
    }
  }
}

Exception

N/A

Expected Behavior

Intellij IDEA should recognize the ressource kubernetes_pod_security_policy and its blocks and attributes and supply code assit values.

Actual Behavior

Intellij IDEA shows warnings for all blocks: Unknown block type spec. Intellij IDEA doesn't show kubernetes_pod_security_policy on code assist for ressources.

Steps to Reproduce

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

  1. Open the HCL in Intellij IDEA
  2. See warnings for resource kubernetes_pod_security_policy
  3. create a new resource block and open code assists for resource type (
  4. Verify that kubernetes_pod_security_policy is not in the list of resources
VladRassokhin commented 3 years ago

Fixed in 0.7.11