Skip to content

helper/schema: Additional validation for non-configurable attributes #336

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

Merged

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Feb 21, 2020

Reference: https://github.com/bflad/tfproviderlint#standard-schema-checks

These Schema fields are only intended for configurable attributes.

@bflad bflad requested a review from a team February 21, 2020 15:11
if v.ValidateFunc != nil {
return fmt.Errorf("%s: ValidateFunc is for validating user input, "+
"there's nothing to validate on computed-only field", k)
if computedOnly {
Copy link
Contributor

Choose a reason for hiding this comment

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

can you ditch the comment above this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done 😄

Copy link
Contributor

@paultyng paultyng left a comment

Choose a reason for hiding this comment

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

Minor nit, see inline comments

@bflad
Copy link
Contributor Author

bflad commented Feb 21, 2020

Comment addressed -- please note I do not have permissions to merge this myself.

@appilon appilon merged commit 147ff55 into hashicorp:version2 Feb 21, 2020
@appilon appilon added this to the v2.0.0 milestone Feb 21, 2020
@ghost
Copy link

ghost commented Mar 23, 2020

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.

@ghost ghost locked and limited conversation to collaborators Mar 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants