Skill / SKILL.md

Provider Test Patterns

hashicorp/agent-skills

Terraform provider acceptance test patterns using terraform-plugin-testing with the Plugin Framework. Covers test structure, TestCase/TestStep fields, ConfigStateChecks with custom statecheck.StateCheck implementations, plan checks, CompareValue for cross-step assertions, config helpers, import testing with ImportStateKind, sweepers, and scenario patterns (basic, update, disappears, validation, regression), and ephemeral resource testing with the echoprovider package. Use when writing, reviewing, or debugging provider acceptance tests, including questions about statecheck, plancheck, TestCheckFunc, CheckDestroy, ExpectError, import state verification, ephemeral resources, or how to structure test files.
2 views 942 repository stars 0 commentsUpdated Nov 28, 2026
Overview

Terraform provider acceptance test patterns using terraform-plugin-testing with the Plugin Framework. Covers test structure, TestCase/TestStep fields, ConfigStateChecks with custom statecheck.StateCheck implementations, plan checks, CompareValue for cross-step assertions, config helpers, import testing with ImportStateKind, sweepers, and scenario patterns (basic, update, disappears, validation, regression), and ephemeral resource testing with the echoprovider package. Use when writing, reviewing, or debugging provider acceptance tests, including questions about statecheck, plancheck, TestCheckFunc, CheckDestroy, ExpectError, import state verification, ephemeral resources, or how to structure test files.

Installation & variants

Download the repository, including the skill’s supporting files.

git clone -- 'https://github.com/hashicorp/agent-skills' skill-source

Use the complete skill-source/plugins/terraform/skills/provider-test-patterns directory with your client’s skill installer.

  • plugins/terraform/skills/provider-test-patterns

    main · SKILL.md

    Open installation source

    Source directory recorded from the imported repository path

Source directory plugins/terraform/skills/provider-test-patterns

Source instructions
Read source instructions

Open to load source instructions

Original SKILL.md

Open to load the original file

Source & validation
Source status
Awaiting source check
Format validation
Format valid
Checked at
Pending source check
Content SHA-256
3c7f192adc02a21450e0dcc4966df8935b1719944c1671433e3b523135001647
Discussion
Comments Be the First to Comment

Please log in to comment

    No comments yet

Related skills