hashicorp/provider-test-patterns
Acceptance test patterns for Terraform providers using terraform-plugin-testing
Open source
Description
provider-test-patterns is an agent skill from HashiCorp with patterns for writing Terraform provider acceptance tests using terraform-plugin-testing with the Plugin Framework. It covers the TestCase and TestStep structure, ConfigStateChecks with custom StateCheck implementations, plan checks, import testing, sweepers and ephemeral resource testing. It includes concrete scenarios for basic, update, disappears, validation and regression tests. The page says that instead of piecing together terraform-plugin-testing patterns from scattered docs and provider examples, the skill gives the full test lifecycle, a field reference and reusable helper patterns in one place. Example jobs from the page are writing acceptance tests for a new resource from scratch, debugging a flaky import test with ImportStateVerify failures, and adding a regression test that reproduces a specific GitHub issue. It is for engineers who test Terraform providers in Go. Install it with npx skills add https://github.com/hashicorp/agent-skills --skill provider-test-patterns. HashiCorp publishes it in its agent-skills repository on GitHub, and the page labels it official.…
Highlights
- TestCase and TestStep structure
- Custom StateCheck and plan checks
- Import testing and ImportStateVerify
- Sweepers and ephemeral resource tests
- Basic, update, disappears, validation and regression scenarios
Ratings & Reviews
No ratings yet
Be the first to rate hashicorp/provider-test-patterns.
People also visit

provider-test-patterns
Terraform provider acceptance test patterns using terraform-plugin-testing
hashicorp/run-acceptance-tests
Run acceptance tests for Terraform providers using Go's test runner
hashicorp/terraform-test
Built-in testing framework for Terraform configurations with .tftest.hcl files
hashicorp/new-terraform-provider
Scaffold a new Terraform provider project using the Plugin Framework
hashicorp/provider-test-patterns FAQ
What does this skill help with?
Writing Terraform provider acceptance tests with terraform-plugin-testing and the Plugin Framework.
How do I install it?
Run npx skills add https://github.com/hashicorp/agent-skills --skill provider-test-patterns.
What test types are covered?
Basic, update, disappears, validation and regression scenarios, plus import tests, sweepers and ephemeral resources.
Can it help with flaky import tests?
Yes. The page gives debugging a flaky import test with ImportStateVerify failures as an example job.
Who publishes it?
HashiCorp, in its agent-skills repository on GitHub. The page labels it official.
What are the best hashicorp/provider-test-patterns alternatives?
Popular alternatives to hashicorp/provider-test-patterns include provider-test-patterns, run-acceptance-tests and hashicorp/run-acceptance-tests. See all hashicorp/provider-test-patterns alternatives





