-
Notifications
You must be signed in to change notification settings - Fork 93
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
Consider InternalValidate equivalent #113
Comments
#157 has an example use case that this theoretical functionality could also check that configuration validation fields are not defined on schemas with no configurable attributes. |
At this juncture, I'm inclined to recommend that we implement any remaining validations to get returned as error diagnostics as part of the |
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. |
The
Provider.InternalValidate()
andResource.InternalValidate()
(which callsschemaMap.InternalValidate()
,Importer.InternalValidate()
) exported functions interraform-plugin-sdk
provide a way for callers to validate that, for example:Optional
andRequired
cannot both be set on the same attributeUpdate
, allComputed
attributes must beForceNew
While many of these do not apply to
terraform-plugin-framework
, we should consider whether an equivalent function is appropriate.The
InternalValidate
equivalent(s) could validate that:PlanModifiers
are not set on data sources (see Attribute plan modification #102)Alternatively, we can declare a user-run internal validation function an anti-pattern, in which case this issue should be closed and the above validation done through other means.
The text was updated successfully, but these errors were encountered: