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

Module does not work with WIF creds #99

Closed
hitk6 opened this issue Aug 6, 2021 · 3 comments
Closed

Module does not work with WIF creds #99

hitk6 opened this issue Aug 6, 2021 · 3 comments
Labels

Comments

@hitk6
Copy link

hitk6 commented Aug 6, 2021

Hello,

We are using WIF (Workload Identity Federation ) to deploy GKE cluster from AWS environment. I have successfully completed the following:

  • Create a WIF for an AWS role.
  • Initialize terraform gcp provider with WIF credentials.
  • Terraform is running and creating various resources in GCP like vpc, subnet, cluster.

The problem I am facing is:

module.gke.module.gcloud_delete_default_kube_dns_configmap.module.gcloud_kubectl.null_resource.run_command[0] (local-exec): ERROR: (gcloud.container.clusters.get-credentials) Your current active account [email@mail.com] does not have any valid credentials.

Please guide me how to use WIF creds with this module.

Thank you

@morgante
Copy link
Contributor

I don't have experience with Workload Identity Federation, but do you have an example of how you would be doing it on the command line (using gcloud) directly?

@angstwad
Copy link

angstwad commented Aug 10, 2021

This could occur if the gcloud is too old to support WIF. Support for WIF was added in googleapis/google-auth-library-python#698, and gcloud would need to pull it in. I believe once gcloud is updated, it should just work. I don't have WIF configured but I did just confirm that my install of gcloud (v 349.0.0) is using google-auth v 1.32.0 which would contain support. Can you update gcloud on the machine where Terraform is running the kubectl-wrapper module? The helper script in there shells out gcloud to obtain creds... if it's up to date, I believe it'll work.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2021

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants