hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.83k stars 9.18k forks source link

Restrict parsing of nullable Bool values to `""`, `false`, and `true` #29379

Open gdavison opened 1 year ago

gdavison commented 1 year ago

Description

In order to simulate values that support Boolean values that can also be unset, the provider currently uses TypeNullableBool which is implemented as a TypeString with special validation and parsing rules to restrict to boolean values.

The parsing rules for TypeNullableBool currently allow 0 and 1 as valid values, matching behaviour of very old versions of Terraform. Only allow the values "", false, and true.

Note: The ideal solution is to update the resources to use terraform-plugin-framework instead of terraform-plugin-sdk/v2. terraform-plugin-framework allows typed nullable values.

The previous parsing behaviour was deprecated in #29378.

Affected Resource(s) and/or Data Source(s)

No response

Potential Terraform Configuration

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue