-
Notifications
You must be signed in to change notification settings - Fork 232
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 resource wanting to destroy and recreate everything when diff is found #1210
Comments
Hi @teddylear 👋 Thank you for raising this. It looks like the similar HashiCorp Discuss topic mostly covered the behavior here from the perspective of Terraform's type system in the post from
To give some additional color to that, terraform-plugin-sdk has a lot of unfortunate/magic logic with set types while the newer terraform-plugin-framework more directly exposes the entire type system "as-is" from Terraform's perspective to providers. Provider developers may opt to move towards terraform-plugin-framework for use cases such as these to take advantage of the more direct type system mappings or use newer Terraform schema capabilities such as map nested attributes to alleviate plan difference issues, but some of those changes may involve breaking changes for existing configurations. More recent versions of Terraform (I believe 1.3+) may be able to render set differences slightly better than older versions where some of the set elements can be aligned on configuration values, however the design is inherently limited by how the provider represents the full data of the set element. The type system handling within terraform-plugin-sdk is relatively in maintenance mode for critical bug fixes while the maintainers are focused on the type system handling within terraform-plugin-framework. Given that and to set expectations that this issue is unlikely to be resolved with any near-term changes in this particular Go module, I'm going to close this issue. Please note though that this practitioner experience report is very valid and it might be best to follow up in other more actionable ways:
Hope this helps and thanks again for writing up this issue to help improve Terraform. |
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. |
Main issue is that it appears value of
TypeSet
below want to destroy and create all the resources in set instead of just updating the one value in the set. Using this as an example, but it has been reported as an issue in other places as well. Is this expected behavior or a bug? If expected, is there another value instead ofTypeSet
that should be used to avoid issues like this for providers? Or is this a use case for a new type?SDK version
Relevant provider source code
From this file
Terraform Configuration Files
Expected Behavior
Actual Behavior
Steps to Reproduce
terraform apply
Uncomment the line mentioning some-bucket-b
terraform apply
References
Copy of issue described in this terraform-aws-provider issue here
The text was updated successfully, but these errors were encountered: