-
Notifications
You must be signed in to change notification settings - Fork 45
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
[create-doks-with-terraform-flux] Avoid querying DOKS cluster metadata in the main TF module, via the digitalocean_kubernetes_cluster
data source
#25
Comments
We shall keep this open. Changing the node count works as expected now. On the other hand, I am able to reproduce the issue again after the fix. This time when I change the cluster region, or pool size, same thing happens. More than that, the I also followed the official kubernetes example from the Interesting though, if I use a random name for the cluster, it behaves as it should. But this seems like a workaround for me. Seems that some users are complaining about same issue as well on the official repo. |
Hi @v-ctiutiu
|
I got this issue while |
Hi @ramwolken9, I'm not sure it it's the same issue, but can you share some more details please? Like the Kubernetes version you're using, Terraform version, and maybe give some other relevant information or steps to help me reproduce the issue first ? Are there any other moving parts in your setup ? What I want to know here is if you changed anything else in the TF module itself (like the Flux CD provider version). Or, did you change anything by hand in the Flux CD system configuration on the Kubernetes cluster ? Thanks. |
@v-ctiutiu Thanks! You are correct, Issue was due to direct modification to cluster recourse from DOKS dashboard. |
Overview
Seems that this combination is behaving like a poison pill:
When used with the following provider:
When you spin up a cluster for the first time, the above combination will work. But, subsequent runs of
terraform plan
fail with:My assumption is that it has to do on how Terraform evaluates resources, providers, data sources, etc. Seems that on subsequent runs, after the DOKS cluster is created, the
depends_on
condition is causing thedigitalocean_kubernetes_cluster
data source to not re-evaluate, or to not return valid data. Thekubernetes
provider will default tolocalhost
instead, if not receiving a valid Kubernetes cluster configuration from the remote.On the other hand, we don't need to lookup data using the
digitalocean_kubernetes_cluster
data source. Thedigitalocean_kubernetes_cluster
resource, is already exposing everything we need after successful creation.Proposed Solution
Avoid lookup using the
digitalocean_kubernetes_cluster
data source, and rely on thedigitalocean_kubernetes_cluster
resource instead.The text was updated successfully, but these errors were encountered: