-
Notifications
You must be signed in to change notification settings - Fork 233
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
Change not triggered for optional / computed string field when set to empty string #1101
Comments
Hi @timofurrer 👋 Thank you for raising this and sorry you ran into this frustrating behavior. This SDK unfortunately implements some automatic behaviors which are difficult to workaround in provider implementations. Schema attributes that are set as I do not believe there is a workaround for this except to potentially introduce a separate attribute that gets filled in with the infrastructure value so The team that maintains this SDK has been working on a reimagined development experience that does not have this automatic behavior over in the Terraform Plugin Framework. The Which SDK? page can provide some guidance on whether to adopt that SDK is appropriate and the framework documentation is now includes a Migrating from SDK section. It is targeted for a version 1.0.0 release next month. |
@bflad 👋 Thanks for the answer!
What's the best way to follow that release (schedule) ? |
To be notified when the release happens, you can watch the terraform-plugin-framework GitHub repository's releases, watch the Plugin Development section in HashiCorp Discuss, or subscribe to the HashiCorp blog. As for the scheduling, you can see the remaining items drop out of the v1.0.0 milestone as they move into other milestones. |
In one of my resources I have the following schema:
When changing from this config:
to this:
it won't trigger a change, because of this:
terraform-plugin-sdk/helper/schema/schema.go
Line 565 in ac0b965
What's the proper way to solve this situation?
In this case
some_attr
is optional and the "infrastructure" may set it to something (hence the computed) or the terraform user can chose to do so.The text was updated successfully, but these errors were encountered: