CtrlK
BlogDocsLog inGet started
Tessl Logo

nicholasjackson/terraform-plugin-framework

Comprehensive documentation and best practices for building Terraform providers with terraform-plugin-framework (v1.17.0). Covers providers, resources, schemas, types, validators, testing, and common pitfalls.

Overall
score

97%

Overview
Eval results
Files

schema-design.mdrules/

Schema Design

Design clear, consistent schemas with proper constraints, validators, and modifiers.

Attribute Constraints

Every attribute must have exactly one of: Required, Optional, or Computed.

  • Required -- user must provide; cannot be combined with Computed
  • Optional -- user may provide
  • Computed -- provider sets; user cannot configure
  • Optional + Computed -- user can provide, provider sets a default if not

Required + Computed is invalid and will error.

Required Modifiers

  • UseStateForUnknown() on all stable computed attributes (IDs, creation timestamps)
  • RequiresReplace() on immutable attributes that force resource recreation

Validators

Always validate user input on Required and Optional attributes:

  • String: LengthAtLeast, LengthBetween, OneOf, regex patterns
  • Number: Between, AtLeast, AtMost
  • Cross-attribute: ExactlyOneOf, AtLeastOneOf, ConflictsWith

Required Metadata

  • Description on every attribute (used for generated provider docs)
  • Sensitive: true on credentials, tokens, passwords, API keys
  • DeprecatedMessage when replacing an attribute

Schema Organization

Group related attributes logically: identity first (name, ID), then configuration, then computed/read-only fields.

See Schema for full attribute type reference. See Validators for built-in and custom validator patterns. See Plan Modifiers for modifier patterns.

Install with Tessl CLI

npx tessl i nicholasjackson/terraform-plugin-framework@0.1.6

README.md

tile.json