Terraform CLI and Framework Versions
Any Terraform CLI version; terraform-plugin-framework v0.10.0
Use Cases or Problem Statement
Provider developers should be able to validate that given set of attributes in a Resource / Data-Source / Provider, respect a schema specification. The options to define this specification should be similar to what's possible to do with the schemavalidator set of AttributeValidators (see #32).
Proposal
Implement ConfigValidators, each fulfilling the interfaces of DataSourceConfigValidator, ProviderConfigValidator and ResourceConfigValidator.
Package: configvalidator
Proposed utilities to instantiate validators:
configvalidator.Conflicting(path.Expression...)
configvalidator.AtLeastOneOf(path.Expression...)
configvalidator.ExactlyOneOf(path.Expression...)
configvalidator.AllOrNone(path.Expression...)
This list is indicative and could be changed/refined during development.
Additional Information
Follow up for: #14, #15, #16, #17, #32
Further details: #32 (review)
Code of Conduct
Terraform CLI and Framework Versions
Any Terraform CLI version; terraform-plugin-framework v0.10.0
Use Cases or Problem Statement
Provider developers should be able to validate that given set of attributes in a Resource / Data-Source / Provider, respect a schema specification. The options to define this specification should be similar to what's possible to do with the
schemavalidatorset ofAttributeValidators (see #32).Proposal
Implement
ConfigValidators, each fulfilling the interfaces ofDataSourceConfigValidator,ProviderConfigValidatorandResourceConfigValidator.Package:
configvalidatorProposed utilities to instantiate validators:
configvalidator.Conflicting(path.Expression...)configvalidator.AtLeastOneOf(path.Expression...)configvalidator.ExactlyOneOf(path.Expression...)configvalidator.AllOrNone(path.Expression...)This list is indicative and could be changed/refined during development.
Additional Information
Follow up for: #14, #15, #16, #17, #32
Further details: #32 (review)
Code of Conduct