Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

no Auth Provider found for name "oidc" #54

Closed
awill1988 opened this issue Jun 3, 2020 · 2 comments
Closed

no Auth Provider found for name "oidc" #54

awill1988 opened this issue Jun 3, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@awill1988
Copy link

awill1988 commented Jun 3, 2020

Terraform Version and Provider Version

Terraform v0.12.26

  • provider.kubernetes v1.11.3
  • provider.kubernetes-alpha (unversioned)
  • provider.random v2.2.1

Affected Resource(s)

  • module.metallb.kubernetes_manifest.metallb-system

Terraform Configuration Files

sys/main.tf

provider "kubernetes-alpha" {
  server_side_planning = true
}

provider "kubernetes" {}

terraform {
  backend "local" {
    path = "/Volumes/Shared/terraform/sys/terraform.tfstate"
  }
}

resource "kubernetes_namespace" "namespace" {
  metadata {
    name = "sys"
  }
}

module "metallb" {
  source = "./metallb"
}
resource "random_string" "secret_material" {
  length = 128
  special = true
  override_special = "/@£$"
}

resource "kubernetes_secret" "secret" {
  metadata {
    namespace = "sys"
    name = "memberlist"
  }

  data = {
    secretkey = random_string.secret_material.result
  }

  type = "Opaque"
}

resource "kubernetes_manifest" "metallb-system" {
  provider = kubernetes-alpha
  manifest = yamldecode(file("./metallb/metallb-system.conf.yml"))
}

Debug Output

https://gist.github.com/awill1988/bac560277d7463a1f529017c653f8b48/raw/fda261648954ccb702537af3efa8e6dc65e57e1c/kubernetes-alpha-debug.log

Panic Output

Expected Behavior

What should have happened?
terraform-provider-kubernetes-alpha would have been able to plan/apply with oidc provider settings in the k8s config.

Actual Behavior

What actually happened?

Exited with failure with the following message:
Error: rpc error: code = Unknown desc = no Auth Provider found for name "oidc"

Oddly enough, I am using the official Kubernetes Provider without this issue can plan and apply with oidc provider configuration

Steps to Reproduce

  1. Enable OIDC provider in k8s api server as described in official documentation
  2. Set credentials for oidc using kubectl as described in official documentation
  3. Set current context as shown in Hashicorp article
  4. terraform plan and observe error output about no oidc provider

Important Factoids

Not sure if it's atypical to use OIDC authentication for kubectl, but OIDC is configured appropriately and I am able to use kubectl without issue. My OIDC provider is Keycloak.

References

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@awill1988 awill1988 added the bug Something isn't working label Jun 3, 2020
@awill1988 awill1988 changed the title Unknown desc = no Auth Provider found for name "oidc" no Auth Provider found for name "oidc" Jun 3, 2020
jan-eat added a commit to jan-eat/terraform-provider-kubernetes-alpha that referenced this issue Jun 4, 2020
inspired by kubernetes/client-go#242

appears to resolve hashicorp#46

probably also fixes hashicorp#54
@jan-eat jan-eat mentioned this issue Jun 4, 2020
2 tasks
@mweichert
Copy link

Watching, as I have the same issue.

@ghost
Copy link

ghost commented Jul 12, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Jul 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants