
Provider Test Patterns
Test structure, check functions, and scenario patterns for Terraform provider acceptance tests built on terraform-plugin-testing and the Plugin Framework.
- CCM score
- 77 of 100
- skills.sh installs
- 3.5K
- GitHub stars
- 941
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers the test lifecycle (plan, apply, refresh, final plan, destroy), TestCase and TestStep fields, and the provider factory setup
- Includes ConfigStateChecks with custom
statecheck.StateCheckimplementations, plan checks, CompareValue, and legacy TestCheckFunc helpers alongsideComposeAggregateTestCheckFunc - Provides scenario patterns for basic, update, import, and disappears tests, plus reference files for checks, sweepers, and ephemeral resources
- Designed for writing, reviewing, or debugging Terraform provider acceptance tests that use the Plugin Framework and terraform-plugin-testing
Install
$ npx -y skills add hashicorp/agent-skills --skill provider-test-patterns -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Provider Acceptance Test Patterns
Patterns for writing acceptance tests using terraform-plugin-testing with the Plugin Framework.
Source: HashiCorp Testing Patterns
References (load when needed):
references/checks.md— statecheck, plancheck, knownvalue types, tfjsonpath, comparersreferences/sweepers.md— sweeper setup, TestMain, dependenciesreferences/ephemeral.md— ephemeral resource testing, echoprovider, multi-step patterns
Test Lifecycle
The framework runs each TestStep through: plan → apply → refresh → final
plan. If the final plan shows a diff, the test fails (unless
ExpectNonEmptyPlan is set). After all steps, destroy runs followed by
CheckDestroy. This means every test automatically verifies that
configurations apply cleanly and produce no drift — no assertions needed for
that.
Test Function Structure
Details
- Repository
- github.com/hashicorp/agent-skills
- Categories
- Testing & QA, Go, DevOps & Cloud
- First seen
- May 16, 2026
More from hashicorp/agent-skills
All 16- Provider Docs3.4K
- Aws Ami Builder3.4K
- Push To Registry3.2K
- Azure Image Builder2.9K
- Windows Builder2.9K
- Terraform Style Guide13.8K
- Terraform Test9.5K
- Refactor Module6.9K
- Terraform Stacks5.9K
- Terraform Search Import5.2K
- Provider Resources4.3K
- New Terraform Provider4.1K
- Provider Actions4.1K
- Run Acceptance Tests3.9K
- Azure Verified Modules3.5K
Similar to Provider Test Patterns
More Testing & QA
terraform-testhashicorp/agent-skills9.5K installsGuide for writing Terraform tests: .tftest.hcl files, run blocks, assertions, mocks, and module output checks.
terraform-skillantonbabenko/terraform-skill8.3K installsDiagnose-first Terraform and OpenTofu guidance covering identity churn, secrets, blast radius, CI drift, and state corruption.
python-testing-patternswshobson/agents41.5K installsComprehensive pytest guide covering fixtures, mocking, parameterization, and test-driven development workflows for Python.
terraform-engineerjeffallan/claude-skills5.9K installsTerraform skill with validation, plan-review, and apply-approval workflow for AWS, Azure, and GCP infrastructure.
contract-testing-builderpatricio0312rev/skills267 installsConsumer-driven contract testing with Pact and OpenAPI validation to catch breaking API changes early.