Skip to content
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

Add PreferWriteOnlyAttribute() validators to resourcevalidator and all value validator packages. #263

Merged
merged 13 commits into from
Feb 19, 2025

Conversation

SBGoods
Copy link
Contributor

@SBGoods SBGoods commented Feb 6, 2025

The PreferWriteOnlyAttribute() validator can be used when you have a write-only version of an existing attribute, and you want to encourage practitioners to use the write-only version whenever possible. The validator returns a warning if the Terraform client is 1.11 or above and the value of the existing attribute is non-null.

The validator has been added to all packages except the datasourcevalidator, ephemeralvalidator, providervalidator, and setvalidator packages, as those types do not support write-only attributes.

@SBGoods SBGoods requested a review from a team as a code owner February 6, 2025 17:05
@SBGoods SBGoods changed the title [Draft] Add PreferWriteOnlyAttribute() validators to resourcevalidator and all value validator packages. Add PreferWriteOnlyAttribute() validators to resourcevalidator and all value validator packages. Feb 6, 2025
@austinvalle austinvalle added the enhancement New feature or request label Feb 7, 2025
@austinvalle austinvalle added this to the v0.17.0 milestone Feb 7, 2025
austinvalle
austinvalle previously approved these changes Feb 7, 2025
Copy link
Member

@austinvalle austinvalle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@SBGoods SBGoods requested a review from austinvalle February 19, 2025 15:23
@SBGoods SBGoods merged commit 13b6d4d into main Feb 19, 2025
6 checks passed
@SBGoods SBGoods deleted the SBGoods/prefer-write-only branch February 19, 2025 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants