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

Allow aws credentials to be passed into exec #124

Closed
wants to merge 1 commit into from

Conversation

heruscode
Copy link

@heruscode heruscode commented Jul 30, 2021

what

  • Add optional envs for AWS credentials when running kube_exec_auth method.

why

  • I have a case where all of my AWS changes are made with temporary AWS credentials, generated by HashiCorp Vault in .tf code. In my Terraform runtime environment i have 0 AWS credentials, so aws eks get-token fails. I need a way to pass credentials into kube_exec_auth.

references

  • This is a implementation example, we can generate AWS credentials using a Vault data_source and pass it into the module.

@heruscode heruscode requested review from a team as code owners July 30, 2021 19:14
@Nuru
Copy link
Contributor

Nuru commented Jul 31, 2021

/test terratest

@Nuru Nuru added the do not merge Do not merge this PR, doing so would cause problems label Jul 31, 2021
@Nuru
Copy link
Contributor

Nuru commented Jul 31, 2021

@heruscode Thank you for your contribution. We appreciate the effort.

Unfortunately, as written, this PR will likely break exec_auth for anyone who is using environment variables to pass AWS credentials.

For your use case, use the default settings where kube_data_auth_enabled is true. The data_auth method is the "right way" and the one we are committed to supporting. The other methods are hacks to work around issues with the Kubernetes provider and the way Terraform handles providers. We are not going to address issues like yours with the other authentication methods.

@Nuru Nuru closed this Jul 31, 2021
@Nuru Nuru added the invalid This doesn't seem right label Jul 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge Do not merge this PR, doing so would cause problems invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants