provider-test-patterns

Standardize Terraform provider acceptance tests using terraform-plugin-testing patterns.

Updated Mar 8, 2026
One-click install
npx skills add https://github.com/hashi-demo-lab/terraform-provider-aap --skill provider-test-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: provider-test-patterns
Source: https://github.com/hashi-demo-lab/terraform-provider-aap/tree/main/.claude/skills/provider-test-patterns
Command: npx skills add https://github.com/hashi-demo-lab/terraform-provider-aap --skill provider-test-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It offers a structured approach to writing Terraform provider acceptance tests, reducing boilerplate and improving test reliability.

Core Features & Use Cases

  • Patterns and references for TestCase/TestStep structure, state and plan checks, and ImportState verification.
  • Guidance on sweepers and ephemeral resource testing with echoprovider; best practices for organizing tests and readability.
  • Real-world use cases for validating provider behavior across full lifecycle.

Quick Start

Read the provider-test-patterns references and start applying standardized acceptance testing patterns in your Terraform provider projects.

Frequently Asked Questions about provider-test-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write acceptance tests for Terraform providers using terraform-plugin-testing?

Acceptance testing for Terraform providers is standardized using terraform-plugin-testing patterns that cover TestCase and TestStep lifecycles, reducing boilerplate and improving test reliability. The Skill provides structured references for organizing these tests.

What are the best patterns for Terraform provider state and plan checks?

Terraform provider state and plan checks are handled through standardized ConfigStateChecks and PlanChecks patterns. These references guide you in validating resource behavior across the full lifecycle to ensure consistent test quality.

How does ImportState verification work in Terraform plugin testing?

ImportState verification in Terraform plugin testing validates that resources can be correctly imported back into state. The Skill documents specific acceptance testing patterns to standardize this import verification across diverse provider scenarios.

Can I test ephemeral resources with terraform-plugin-testing?

Ephemeral resources can be tested using terraform-plugin-testing with guidance from the Skill's ephemeral testing patterns. It includes best practices and real-world use cases utilizing echoprovider to validate ephemeral resource behavior.

What are Terraform provider sweepers and how do I use them?

Terraform provider sweepers are cleanup mechanisms used to remove leftover infrastructure before or after acceptance tests run. The Skill provides guidance on implementing sweeper patterns alongside other standardized testing references for consistent test quality.

Do I need terraform-plugin-testing to standardize provider acceptance tests?

Standardizing provider acceptance tests requires terraform-plugin-testing to properly structure TestCase and TestStep lifecycles. The Skill's patterns depend on this framework to ensure consistent test quality and reduce boilerplate across diverse provider scenarios.