You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a scenario, where I need to refresh the local kubeconfig with the one from the target host. Right now, terraform does not offer a way to copy a remote file to the local host.
Is there a way to refresh the kubeconfig with the current module if I lose the tfstate or any other alternative solution that can be automated via terraform?
Thanks
The text was updated successfully, but these errors were encountered:
Hi @alita1991, the only way I can found today is using the external provider which allows you to make what you want and expose any information to Terraform (like a shell script that cat | sed the kubeconfig remotely).
Hi, sadly, the external provider does not allow the user to SSH directly, I decided to pick a module developed by the community called terraform-provider-ssh, which does what I need.
If there is a better solution, please let me know, if not, you can close this ticket.
Thank you for sharing this, it will help the next ones who will ask this question.
Unfortunately, I currently have a better way to do this with a Terraform module.
I think the best way to handle this type of action (and others from different issues) is to migrate this module into a Terraform provider, which takes a lot more time to do and maintain.
Hi,
I have a scenario, where I need to refresh the local kubeconfig with the one from the target host. Right now, terraform does not offer a way to copy a remote file to the local host.
hashicorp/terraform#3379
Is there a way to refresh the kubeconfig with the current module if I lose the tfstate or any other alternative solution that can be automated via terraform?
Thanks
The text was updated successfully, but these errors were encountered: