Open sumit5790 opened 1 year ago
Hello! Thank you for opening this issue @sumit5790, could you include your kubernetes_manifest
resource config. The error that's being outputted shows a manifest issue and not so much a helm_release
issue.
HI, I'm stuck with solving that issue as well after updating from 1.21 to 1.23.
I'm deploying mongodb-operator with the kubernetes_manifest resource:
locals {
crd = yamldecode(file("${path.module}/resources/crd.yaml"))
manager = yamldecode(file("${path.module}/resources/manager.yaml"))
}
resource "kubernetes_manifest" "crd" {
manifest = local.crd
}
this is exact the content of crd.yaml
it errors when performing terraform plan with:
│ Error: Plugin error
│
│ with module.kubernetes.module.mongodb_operator.kubernetes_manifest.crd,
│ on ../../kubernetes/mongodb-operator/main.tf line 16, in resource "kubernetes_manifest" "crd":
│ 16: resource "kubernetes_manifest" "crd" {
│
│ The plugin returned an unexpected error from plugin.(*GRPCProvider).UpgradeResourceState: rpc error: code = Unknown desc = failed to determine resource GVK: cannot select exact GV from REST mapper
I was able to validate that the yamldecode is successfully decoding the crd.yaml with terraform console. it outputs valid tf code.
You're trying to apply a resource type that doesn't exist. Since it says CRD in there, I wouldn't be surprised if you're trying to push a v1beta1 CRD that has been removed from 1.22. https://kubernetes.io/docs/reference/using-api/deprecation-guide/#customresourcedefinition-v122
I am getting the issue when updating the ingress as I update my eks cluster from 1.21 to 1.22. error: ╷ │ Error: Plugin error │ │ with kubernetes_manifest.nginx-controller-ingress[0], │ on main.tf line 342, in resource "kubernetes_manifest" "nginx-controller-ingress": │ 342: resource "kubernetes_manifest" "nginx-controller-ingress" { │ │ The plugin returned an unexpected error from │ plugin.(GRPCProvider).UpgradeResourceState: rpc error: code = Unknown desc │ = failed to determine resource GVK: cannot select exact GV from REST mapper ╵ ╷ │ Error: Plugin error │ │ with kubernetes_manifest.opensearch_ingress[0], │ on main.tf line 619, in resource "kubernetes_manifest" "opensearch_ingress": │ 619: resource "kubernetes_manifest" "opensearch_ingress" { │ │ The plugin returned an unexpected error from │ plugin.(GRPCProvider).UpgradeResourceState: rpc error: code = Unknown desc │ = failed to determine resource GVK: cannot select exact GV from REST mapper ╵ the provider I am using: