StealIt

Provider Test Patterns

provider-test-patterns

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.

Install

Run this in your project folder. It works with Claude Code, Cursor, Codex and dozens of other agents.

$ npx skills add hashicorp/agent-skills --skill provider-test-patterns

Needs Node.js. Add -g to install for every project, or -a claude-code to skip the agent picker.

How to use Provider Test Patterns

Once it's installed, Claude reads this skill on its own whenever a request matches what it's for, so you don't have to mention it by name. In Claude Code you can also run it directly by typing /provider-test-patterns.

It contains no scripts, only instructions and reference files, so it can't run code on its own.

What the instructions cover

  1. 1Test Lifecycle
  2. 2Test Function Structure
  3. 3Provider Factory
  4. 4TestCase Fields
  5. 5TestStep Fields
  6. 6Check Functions
  7. 7Config Helpers
  8. 8Scenario Patterns
  9. 9Helper Functions

Section headings from the skill's SKILL.md file.

What's inside · 4 files

  • SKILL.md
  • references/checks.md
  • references/ephemeral.md
  • references/sweepers.md

More from HashiCorp

See all →

AWS Ami Builder

Build Amazon Machine Images (AMIs) with Packer using the amazon-ebs builder. Use when creating custom AMIs for EC2 instances.

Cloud & DevOpsHashiCorp913

Azure Image Builder

Build Azure managed images and Azure Compute Gallery images with Packer. Use when creating custom images for Azure VMs.

Cloud & DevOpsHashiCorp913

Azure Verified Modules

Azure Verified Modules (AVM) requirements and best practices for developing certified Azure Terraform modules. Use when creating or reviewing Azure modules that need AVM…

Cloud & DevOpsHashiCorp913

New Terraform Provider

Use this when scaffolding a new Terraform provider with the Plugin Framework: workspace layout, go module setup, provider server main.go, and a provider.go with schema and…

Cloud & DevOpsHashiCorp913
See all →

Deploy To Vercel

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a…

Cloud & DevOpsVercel34k

Vercel CLI With Tokens

Deploy and manage projects on Vercel using token-based authentication. Use when working with Vercel CLI using access tokens rather than interactive login — e.g. "deploy to…

Cloud & DevOpsVercel34k

Vercel Optimize

Use for Vercel cost and performance optimization on deployed projects, especially Next.js, SvelteKit, Nuxt, and limited Astro apps. Collect Vercel metrics, usage, project config…

Cloud & DevOpsVercel34k

Connectivity Triage

Use this skill when debugging active macOS connectivity failures, when an API or MCP service times out or disconnects, when DNS resolution is failing or inconsistent, or when…

Cloud & DevOpsSeth Hobson42k