Hello from an excited newbie to using terraform. At the company I am working at I am changing the install method to based on terraform. Right now we have two modules - one for provisioning the EKS cluster and the other for Helm installing our kubernetes cluster.
We want to try to combine the two into one root module. So that users who install with terraform don’t need to terraform apply
in two separate directories, and can clean up with a single terraform destroy
. I have two questions:
-
Is this a good idea to have a single environment? (since all the tutorials I’ve seen provision two environments, so it seems TF is not meant for this)
-
Practically any advice on how to do it? The issue is passing in the kubeconfig credentials of the newly created cluster into the helm and kubernetes providers to authenticate . It seems that
depends_on
does not work with providers, and only with resources.
Would highly appreciate any help/newbie enlightenment from the community.
Thanks!