-
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
TypeSet is always be reordered #27018
Comments
Hi @merceskoba Yes, this can be an unfortunate behavior with this schema combination. In most cases terraform does not show changed elements within a set when constructing the diff output. What is happening is that there must be other "unimportant" change which are not shown here, causing these set elements to change their value. While we have heuristics to elide some lines of these trivial changes, it still causes the entire set value to change which needs to be displayed. The new output in 0.14 should at least present the changes in a sorted order to make them easier to spot. The real culprit here is the legacy provider SDK, which cannot handle the full rich type system that is used within terraform. The impedance mismatch often leaks some changes, most often Since this is primarily caused by the plugin SDK (though providers can sometimes work around it in their side), and there's not much more we can do in terraform core until a new SDK is in use, I'm going to close this out for now. 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
I add host_rule for hosts "beta.domain.tld"
Debug Output
Expected Behavior
Steps to Reproduce
Additional Context
TL;DR
Every part of new host_rule i add, the terraform will re-sort the host_rule order. It will make the terraform looks like removing existing host_rule and then add back the existing host_rule and the new host_rule in the same time.
I am affraid to use this in production, because i have 39 host_rule.
I cannot imagine if i add the 40th host_rule and terraform shows it removes 39 host_rule and then add 39 host_rule back + 1 new host_rule...
Magicly, when i apply it, the existing hosts aren't removed. So, it's like the terraform removes them only in terraform side but not in google cloud side
I have opened it in Google Cloud Provider
host_rule uses TypeSet and i think The TypeSet behaviour is on terraform site not provider site.
The text was updated successfully, but these errors were encountered: