installskill

Skills / hashicorp/agent-skills

provider-test-patterns

Acceptance test patterns for Terraform providers using terraform-plugin-testing.

Pinned commit
5e30fa5c867bCommitted 2026-11-03
Files
428 KB
License
GPL
Snapshot taken
2026-11-28
Description from the skill
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.

This is the text your agent reads to decide when to use the skill.

Install

Choose your agent. Pinned commands install exactly the commit this page describes.

Skill directory .claude/skills/Claude Code · Official docs

Does not read the shared .agents/skills directory. A skill must land in .claude/skills, or arrive inside a plugin.

GitHub CLIpinned

$ gh skill install hashicorp/agent-skills plugins/terraform/skills/provider-test-patterns --agent claude-code --pin 5e30fa5c867ba6777c37e4206babfd08049c396f

gh picks the directory for the agent, names the folder after the source directory (provider-test-patterns), and writes source metadata into the SKILL.md frontmatter, so the content hash below will not match. Check the github-tree-sha it records instead: it should read 0d58044e2647b6c3fc114955391cdbc767396e96.

skills CLIpinned

$ npx skills add hashicorp/agent-skills@5e30fa5c867ba6777c37e4206babfd08049c396f --skill provider-test-patterns -a claude-code --copy

Downloads and runs the skills package from npm. --copy writes real files instead of symlinks. The CLI sends anonymous telemetry unless DISABLE_TELEMETRY=1 is set, and that setting also turns off its audit lookups.

Claude Code pluginnot pinnedrun inside the agent

> /plugin marketplace add hashicorp/agent-skills
> /plugin install terraform@hashicorp

Not pinned: installs whatever the marketplace currently serves. The plugin bundles 15 other skills with this one. Plugin scope is chosen in the /plugin dialog.

Plain gitpinned

$ tmp=$(mktemp -d)
$ git clone --quiet https://github.com/hashicorp/agent-skills.git "$tmp"
$ git -C "$tmp" checkout --quiet 5e30fa5c867ba6777c37e4206babfd08049c396f
$ mkdir -p .claude/skills
$ cp -R "$tmp/plugins/terraform/skills/provider-test-patterns" .claude/skills/provider-test-patterns

No extra tooling. Files land byte for byte as published in .claude/skills/provider-test-patterns, so the content hash below can be checked directly.

Check what landed

Run this after installing. It prints one SHA-256 for the whole directory. If your installer reported a different directory, cd there instead.

$ cd .claude/skills/provider-test-patterns && find . -type f -print0 | LC_ALL=C sort -z | xargs -0 shasum -a 256 | shasum -a 256

Expected5be50a45e6da9283d04196991cad3a891bdc7304c6100eed72a0dd142650d8d8

It matches only when the files are byte for byte as published. A difference means something changed: by the installer, by you, or upstream.

What is inside

Pattern matches in the files, each linked to its line. A match is a place to read, not a verdict, and no match is not proof of absence.

Docs · 3SKILL.md · 1

Runs commands1

Code that spawns other processes, or shell code blocks in the instructions.

0 in scripts · 1 in docs and other text files

Network accessNo match

Calls that fetch from or send to a remote host.

Installs packagesNo match

Commands that pull and run third-party packages at use time.

Reads env or credentials2

References to environment variables, tokens, keys or credential files.

0 in scripts · 2 in docs and other text files

Privileged or destructiveNo match

sudo, recursive deletes, permission changes and similar commands.

Dynamic or encoded codeNo match

eval, exec, base64 decoding and remote-script piping, which hide what runs.

Outside hosts mentioned

Hostnames of every URL in the text files.

  • developer.hashicorp.com×5
  • github.com×3

Entries worth a second look

No symlinks, submodules, hidden files, archives, compiled files or unscanned files.

File manifest

Every file in the skill directory at the pinned commit.

Content hash
5be50a45e6da9283d04196991cad3a891bdc7304c6100eed72a0dd142650d8d8
Git tree SHA
0d58044e2647b6c3fc114955391cdbc767396e96
PathKindSizeSHA-256
SKILL.mdSKILL.md13 KB9abc623c2523ee76…
references/checks.mdDocs6.7 KBb5e42a63d3553477…
references/ephemeral.mdDocs5.9 KB47327fe13a8a87b9…
references/sweepers.mdDocs2.3 KBb5f76a046a84855c…

Spec and portability

Checked against the Agent Skills specification.

Frontmatter
Parses as YAML
Name matches directory
Yes
Name uses lowercase letters, digits and hyphens
Yes
Description length
712limit 1,024 characters
SKILL.md body
398 linesthe spec suggests under 500 lines
Fields outside the spec
None
License field
None declared
License file
None declared
Repository license
LICENSE (GPL)
Claude Code plugin
terraform@hashicorp

Change history

No changes recorded since the first snapshot on 2026-11-28.

Follow changes to this skill in a feed reader: Atom feed · all skills

Get an email when this skill changes

Email alerts are not built yet. Leave your address and we will write to you once, when they are. The feed above works today.

We store your address, the name of this skill and the date. It is used for nothing else.