terraform-provider-argocd
terraform-provider-argocd copied to clipboard
kubeconfig parameter for kubernetes block
Description
Add a kubeconfig parameter for the kubernetes block. Currently you may set this via the KUBECONFIG env var, but this will not work when using multiple argocd providers necessitating distinct kubeconfig files
Hi @charlysotelo,
I'm afraid this is not possible at present as the argocd
codebase does not provide a mechanism for this to be configured when using port forwarding (relying instead on the standard behaviour of NewDefaultClientConfigLoadingRules
in the kubernetes
module).
That being said... This is pushing my knowledge of k8s configuration, but... I do believe that you can configure multiple kubeconfig
files in the KUBECONFIG
environment variable (see Kubernetes docs). So, AFAIK, you should be able to configure the env var with all required kubeconfig
files and then use the provider configuration kubernetes.config_context
to specify which context to use from the merged config.
Stale