Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform panic: value is null #1552

Closed
AndreaGiardini opened this issue Dec 20, 2021 · 3 comments
Closed

Terraform panic: value is null #1552

AndreaGiardini opened this issue Dec 20, 2021 · 3 comments
Labels

Comments

@AndreaGiardini
Copy link

Hello everyone 👋

I am having trouble using this provider since version 2.5.0. ATM I am stuck on version 2.4.1 since every version after that crashes terraform for me. I have attached the panic log below. Let me know in case you need any other info

Terraform Version, Provider Version and Kubernetes Version

Terraform version: 1.1.2 (terraform cloud)
Kubernetes provider version: every version since 2.5.0.
-> 2.4.1 is the last known working version
Kubernetes version: 1.20.10

Panic Output

https://gist.github.com/AndreaGiardini/c944f8a0af387f1095db7691f2c3a1ec

Steps to Reproduce

  1. terraform plan
@AndreaGiardini
Copy link
Author

AndreaGiardini commented Dec 23, 2021

The panic is related to this resource:

resource "kubernetes_manifest" "letsencrypt_crd" {

  depends_on = [helm_release.cert_manager]

  lifecycle {
    ignore_changes = all
  }

  manifest = {
    "apiVersion" = "cert-manager.io/v1"
    "kind"       = "ClusterIssuer"
    "metadata" = {
      "name" = "letsencrypt"
    }
    "spec" = {
      "acme" = {
        "email"          = "[email protected]"
        "privateKeySecretRef" = {
          "name" = "letsencrypt"
        }
        "server" = "https://acme-v02.api.letsencrypt.org/directory"
        "solvers" = [
          {
            "http01" = {
              "ingress" = {
                "class" = "ingress-nginx"
              }
            }
          },
        ]
      }
    }
  }
}

When this resource is removed terraform does not crash

@AndreaGiardini
Copy link
Author

In case you find yourself in the same situation, the following workaround works for me:

  • Remove the resource from your manifest -> terraform apply
  • Upgrade provider -> terraform apply
  • Restore the resource -> terraform apply

@github-actions
Copy link

Marking this issue as stale due to inactivity. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. This helps our maintainers find and focus on the active issues. Maintainers may also remove the stale label at their discretion. Thank you!

@github-actions github-actions bot added the stale label Jan 15, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant