-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Data resource forces update in modules with count #25759
Comments
@jbardin can you help me understand this? Is this a matter of the |
Yes, it appears that The If this is still happening with 0.13.0, I would need a trace log or reproduction to learn more. |
Thanks @jbardin! @atimush, do you think you can help generate a simplified reproduction case that we can run directly? The code you've provided has dependencies I can't see, so we'd need something we can copy-paste or git clone. Ideally, this would have a similar structure but leave out helm and eks, because the effort of setting up an EKS + helm infrastructure is pretty significant. |
Note: this might turn out to be an unrelated issue It seems that at least this specific AWS data source (aws_vpcs) forces an update in v0.13.0. It does not have to be in a module or use count.
This code applies only once, as expected, on TF v0.12.29. With TF v0.13.0 it tries to read the data source during apply.
(Note: The AWS provider version is the same in both cases - 3.2.0) |
Hi @qwerty1979bg, I think the issue you are having is reported at hashicorp/terraform-provider-aws#14579. |
@remilapeyre, thanks ! This is an exact match ! :) @atimush, |
Thanks for the pointer, @remilapeyre! I believe the issue over in the AWS provider affects the My sense is that this problem arose because a plural data source doesn't really have a single id string to use, and the Terraform SDK requires that every data source result include a non-empty However, because With that said, as @danieldreier said the next step here would be to find a simplified configuration that we can run to reproduce the problem. Hopefully there's a smaller reproduction case that includes only |
To be clear, the non-deterministic ID issues described in terraform-provider-aws#14579 is only the symptom. There are 2 primary causes we have found: data sources that are altering non-computed attributes, and the SDK altering zero block values. Since those two situations cover all the known cases so far, we should probably just wait and confirm the status of this issue with the upcoming aws provider and core releases. |
Hello guys, Still, the existing EKS modules are reporting the same issue. Noticed that the problem is not related with AWS region only data source but with any data resources (even with some of the AWS IAM Policy documents). I would assume could be something related to the providers: Providing below some of the traces that might help:
Feel free to close the case if we can not find the root cause of this behaviour. Will try to update in the upcoming hours if able to re-produce it in a more simple way. Thank you, |
You mention that this happens with a module count in conjunction with the data sources. Without a repro we can't tell exactly what's going on, but some general debugging may help. I suspect the data source being shown in the plan is simply a side-effect of what's going on, and not the reason. From the partial config here, I would suspect it's being caused by something in the First thing to check, is this still a problem with 0.13.1? Reducing the problem to a single config change that triggers the diff could give us a clue as to what is going on. Thanks |
There hasn't been any new activity here, so I'm going to close this out. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Terraform Version
Terraform Configuration Files
The submodule (./modules/eks_helm_components):
The root module:
Debug Output
Crash Output
Expected Behavior
TF should not force Helm resource update on each plan unless data resource change.
Actual Behavior
TF forces the Helm resource to update on each plan.
Steps to Reproduce
terraform init
terraform apply
terraform plan
Additional Context
The state file has the
"current": null,
value. We run TF in TF Cloud.References
The text was updated successfully, but these errors were encountered: