-
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
Optional and Computed fields cannot be updated to an empty string #173
Comments
Hi @kayrus! We marked this as an enhancement because the SDK is currently working as designed (it considers empty string equivalent to not being set at all because Terraform 0.11 and earlier do not have However, this is good feedback that will inform future changes to the design of the SDK as we prepare for adopting new Terraform 0.12 features, like the new explicit |
I just wonder why zero int is handled correctly. Haven't dig deep into the code. |
Any news on this issue? |
@radeksimko @apparentlymart any news on this issue? |
Hi @kayrus Supporting 0.12 types (which includes The best you can do in the meantime is to read this blogpost, share it and encourage everyone to upgrade to 0.12. I'm going to close this as duplicate of #102 since it covers all types and it will allow us to keep discussion in one place. |
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
Debug Output
Crash Output
Expected Behavior
I expect that optional computed field empty string value will be detected as desirable and terraform will try to update this string, as it is done with integer variable being explicitly set to 0.
Actual Behavior
Setting the optional computed field to an empty string is not reflected in a change and terraform doesn't update the computed field to an empty string.
Steps to Reproduce
Additional Context
References
Probably related to hashicorp/terraform#21760
The text was updated successfully, but these errors were encountered: