Back to skills

provider-test-patterns

testing

Patterns for writing Terraform provider acceptance tests using terraform-plugin-testing with the Plugin Framework. Covers TestCase and TestStep structure, ConfigStateChecks with custom StateCheck impl

Setup & Installation

npx skills add https://github.com/hashicorp/provider-test-patterns --skill provider-test-patterns
or paste the link and ask your coding assistant to install it
https://github.com/hashicorp/provider-test-patterns
View on GitHub

What This Skill Does

Patterns for writing Terraform provider acceptance tests using terraform-plugin-testing with the Plugin Framework. Covers TestCase and TestStep structure, ConfigStateChecks with custom StateCheck implementations, plan checks, import testing, sweepers, and ephemeral resource testing. Includes concrete scenarios for basic, update, disappears, validation, and regression tests. Rather than piecing together terraform-plugin-testing patterns from scattered docs and provider examples, this skill gives you the full test lifecycle, field reference, and reusable helper patterns in one place.

When to use it

  • Working with provider test patterns functionality
  • Implementing provider test patterns features
  • Debugging provider test patterns related issues