Closed giulianna14 closed 1 year ago
@giulianna14 I did some tests and found that changing from false to removing the value in version 1.33 seems to have no effect on the configuration. Terraform would report:
No changes. Your infrastructure matches the configuration.
Terraform has compared your real infrastructure against your
configuration and found no differences, so no changes are needed.
Perhaps that answers the question, but @jeremmfr may have more input.
Hi @giulianna14 👋 ,
As described in the CHANGELOG.md, optional boolean attributes no longer accept value false
when a resource has been migrate to new terraform-plugin-framework.
The default value for all optional attributes is null
unless otherwise specified.
The old terraform-plugin-sdk considers the value false
and null
as the same, and with this plugin, it's difficult to know whether the attribute is set to false
or not set in the Terraform configuration.
So for greater ease of use, my provider accepted the value false
in Terraform configuration and set to false
in Terraform state even if null
(not set) in Terraform configuration.
The new terraform-plugin-framework no longer considers false
and null
as the same, so I prohibited false
to avoid an infinite plan to change null
to false
.
@jeremmfr Thank you so much for the response!
When migrating the version from 1.33 to version 2, we received some errors on a few resources.
I reviewed the documentation and could not find the default for these specific resources.
Since optional boolean attributes don't accept the value false, is false the default when leaving the attribute out?
Thank you!