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 "gcp" #46

Closed
dmaasland opened this issue May 28, 2020 · 2 comments
Closed

no Auth Provider found for name "gcp" #46

dmaasland opened this issue May 28, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@dmaasland
Copy link

Hiya,

I'm unable to get the examples working when using GKE.

Terraform Version and Provider Version

Terraform v0.12.26

Affected Resource(s)

  • kubernetes_manifest

Terraform Configuration Files

As found here: https://github.com/hashicorp/terraform-provider-kubernetes-alpha/blob/master/examples/deployment/deployment.tf

provider "kubernetes-alpha" {
}

resource "kubernetes_manifest" "test-deployment" {
  provider = kubernetes-alpha

  manifest = {
    "apiVersion" = "apps/v1"
    "kind"       = "Deployment"
    "metadata" = {
      "labels" = {
        "app" = "nginx"
      }
      "name"      = "nginx-deployment"
      "namespace" = "default"
    }
    "spec" = {
      "replicas" = 3
      "selector" = {
        "matchLabels" = {
          "app" = "nginx"
        }
      }
      "template" = {
        "metadata" = {
          "labels" = {
            "app" = "nginx"
          }
        }
        "spec" = {
          "containers" = [
            {
              "image" = "nginx:1.14.2"
              "name"  = "nginx"
              "ports" = [
                {
                  "containerPort" = 80
                  "protocol"      = "TCP"
                },
              ]
            },
          ]
        }
      }
    }
  }

}

Debug Output

https://gist.github.com/dmaasland/d5efabdf038e96b8abb649bad9180043

Expected Behavior

Create a plan

Actual Behavior

Crash with error:

user@ubuntu-dev:~/projects/test$ terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.


------------------------------------------------------------------------

Error: rpc error: code = Unknown desc = no Auth Provider found for name "gcp"

Steps to Reproduce

  1. Login to GKE gcloud container clusters get-credentials <cluster name> --region <region> --project <project>
  2. terraform plan

Important Factoids

I'm using GKE, not standard Kubernetes.

References

This seems to be related, but I can't seem to apply the fix proposed there:

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@dmaasland dmaasland added the bug Something isn't working label May 28, 2020
@aareet
Copy link
Contributor

aareet commented May 29, 2020

I was able to reproduce this

Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.0", GitCommit:"70132b0f130acc0bed193d9ba59dd186f0e634cf", GitTreeState:"clean", BuildDate:"2019-12-13T11:52:32Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"16+", GitVersion:"v1.16.8-gke.15", GitCommit:"9cabee15e0922c3b36724de4866a98f6c2da5e6a", GitTreeState:"clean", BuildDate:"2020-05-01T21:47:04Z", GoVersion:"go1.13.8b4", Compiler:"gc", Platform:"linux/amd64"}

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
@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 👉 [email protected]. 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