Questions regarding how to setup FluxCD on a GKE cluster created via fabric-fast modules #3465
Replies: 1 comment
-
|
We don't have any recommendation, but I can tell you that in the past we had end-to-end GKE examples showing how to deploy specific applications in GKE (from no cluster all the way to a fully-deployed workload), and we used approach 2. I don't know if things have changed in recent versions, but up until last year, it wasn't possible to configure a provider with a dynamic value. Terraform's documentation still mentions this:
I don't know about OpenTofu, but it seem approach 1 is still not possible in Terraform-land. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
First, thanks for all the great work on this repo! I'm actively using the fabric-fast modules to create my GKE cluster (standard + nodepools) among many other gcp resources, and am very happy with it.
For now, I did the FluxCD setup to connect to my GKE cluster and my Gitlab instance manually, but I would now like to automate this using the FluxCD Terraform/Tofu provider.
My core question is about the recommended way to provision everything (GKE resources + FluxCD bootstrap/setup) from scratch.
1. Is it possible to do this in a single
tofu apply? My concern is a potential cyclic dependency, as the Flux provider needs GKE credentials (kubeconfig) before the cluster is created, which would likely cause the tofu plan to fail.2. Or, is a sequential approach the recommended way? For example:
My main concern with this approach is the
kubeconfig. If I only run the Project 2plan+applylater, isn't it likely that thekubeconfigoutput from Project 1 will have expired? How is this scenario typically handled?.tfstate file?Thanks a lot for any guidance you can provide!
Beta Was this translation helpful? Give feedback.
All reactions