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

kubernetes provider: No Auth Provider found (GCP) #15244

Closed
mattes opened this issue Jun 10, 2017 · 3 comments
Closed

kubernetes provider: No Auth Provider found (GCP) #15244

mattes opened this issue Jun 10, 2017 · 3 comments

Comments

@mattes
Copy link

mattes commented Jun 10, 2017

Terraform Version

Terraform v0.9.8

Affected Resource(s)

  • kubernetes

Terraform Configuration Files

provider "kubernetes" {}

resource "kubernetes_namespace" "example" {
  metadata {
    name = "my-first-namespace"
  }
}

Debug Output

[truncated]
2017/06/10 02:12:01 [DEBUG] plugin: terraform: kubernetes-provider (internal) 2017/06/10 02:12:01 [INFO] Successfully loaded config file (/Users/matthias/.kube/config; default context)
2017/06/10 02:12:01 [ERROR] root: eval: *terraform.EvalConfigProvider, err: Failed to configure: No Auth Provider found for name "gcp"
2017/06/10 02:12:01 [ERROR] root: eval: *terraform.EvalSequence, err: Failed to configure: No Auth Provider found for name "gcp"
2017/06/10 02:12:01 [ERROR] root: eval: *terraform.EvalOpFilter, err: Failed to configure: No Auth Provider found for name "gcp"
2017/06/10 02:12:01 [ERROR] root: eval: *terraform.EvalSequence, err: Failed to configure: No Auth Provider found for name "gcp"
2017/06/10 02:12:01 [TRACE] [walkPlan] Exiting eval tree: provider.kubernetes
2017/06/10 02:12:01 [DEBUG] dag/walk: upstream errored, not walking "kubernetes_namespace.example"
2017/06/10 02:12:01 [DEBUG] dag/walk: upstream errored, not walking "meta.count-boundary (count boundary fixup)"
2017/06/10 02:12:01 [DEBUG] dag/walk: upstream errored, not walking "provider.kubernetes (close)"
2017/06/10 02:12:01 [DEBUG] dag/walk: upstream errored, not walking "root"
�[31mError running plan: 1 error(s) occurred:

2017/06/10 02:12:01 [DEBUG] plugin: waiting for all plugin processes to complete...
* provider.kubernetes: Failed to configure: No Auth Provider found for name "gcp"�[0m�[0m
2017/06/10 02:12:01 [DEBUG] plugin: terraform: kubernetes-provider (internal) 2017/06/10 02:12:01 [DEBUG] plugin: waiting for all plugin processes to complete...
2017/06/10 02:12:01 [DEBUG] plugin: /usr/local/Cellar/terraform/0.9.8/bin/terraform: plugin process exited

Error Output

provider.kubernetes: Failed to configure: No Auth Provider found for name "gcp"

I tried several options, even with statically defined credentials the same error is thrown.

@mattes
Copy link
Author

mattes commented Jun 10, 2017

Here is my kubectl config ...

- name: gke_xxxx_us-central1-a_primary
  user:
    auth-provider:
      config:
        access-token: xxxx
        cmd-args: config config-helper --format=json
        cmd-path: /Users/matthias/google-cloud-sdk/bin/gcloud
        expiry: 2017-06-10T06:13:35Z
        expiry-key: '{.credential.token_expiry}'
        token-key: '{.credential.access_token}'
      name: gcp

@mattes
Copy link
Author

mattes commented Jun 11, 2017

I think I found the cause. The official K8S Go library decided to make the gcp auth provider an optional dep.

ref: kubernetes/client-go#95
ref: kubernetes/kubernetes#41532
ref: coreos/tectonic-forum#99

So I guess the Kubernetes provider just needs to import k8s.io/client-go/plugin/pkg/client/auth/gcp ?

@mattes mattes changed the title kubernetes provider: No Auth Provider found kubernetes provider: No Auth Provider found (GCP) Jun 11, 2017
e-max added a commit to e-max/terraform-provider-kubernetes that referenced this issue Jun 18, 2017
As described here hashicorp/terraform#15244 (comment)
client-go doesnt enable GCP auth plugin by default. We have to do it explicitly
e-max added a commit to e-max/terraform-provider-kubernetes that referenced this issue Jun 19, 2017
As described here hashicorp/terraform#15244 (comment)
client-go doesn't enable GCP auth plugin by default. We have to do it explicitly
e-max added a commit to e-max/terraform-provider-kubernetes that referenced this issue Jun 22, 2017
As described here hashicorp/terraform#15244 (comment)
client-go doesn't enable GCP auth plugin by default. We have to do it explicitly
radeksimko pushed a commit to e-max/terraform-provider-kubernetes that referenced this issue Jun 25, 2017
As described here hashicorp/terraform#15244 (comment)
client-go doesn't enable GCP auth plugin by default. We have to do it explicitly
@ghost
Copy link

ghost commented Apr 9, 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants