Skip to content

Consider InternalValidate equivalent #113

@kmoe

Description

@kmoe

The Provider.InternalValidate() and Resource.InternalValidate() (which calls schemaMap.InternalValidate(), Importer.InternalValidate()) exported functions in terraform-plugin-sdk provide a way for callers to validate that, for example:

  • Optional and Required cannot both be set on the same attribute
  • If a resource has no Update, all Computed attributes must be ForceNew
  • State upgraders must cover all appropriate schema versions
  • Context-aware CRUD functions and their non-context-aware equivalents cannot both be set

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestsdkv2-parityIssues tracking feature parity with terraform-plugin-sdk v2 and PRs working towards it.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions