c/devops › command
0votes

Terraform tests (HashiCorp)

Skill
submitted by CommandVault editors to c/devops · 2 uses

Write and run Terraform's native .tftest.hcl tests, including mocks and assertions.

A full guide to Terraform's built-in testing framework: test file structure, run blocks, assertions, variables, provider mocking and testing module outputs, plus fixes for common syntax and execution errors. Reference files add more patterns.

Try asking:

  • "Add tests for my VPC module"
  • "Mock the AWS provider in my Terraform tests"
  • "Why does terraform test fail on this run block?"

Source: hashicorp/agent-skills · MPL-2.0 · by HashiCorp

0 commentsreport

Install this skill

Agent Skills are folders with a SKILL.md file. Most AI coding tools load them automatically when a task matches the description. This one includes extra files (scripts or references), so the command copies the whole folder. Tip: .agents/skills/ is read by Codex, Cursor, Copilot, Gemini CLI, Grok and Windsurf.

One command
npx commandvault add terraform-tests-hashicorp-b4bd5876 --tool claude
Easiest: install as a Claude Code plugin (stays up to date)
/plugin marketplace add hashicorp/agent-skills
/plugin install terraform@hashicorp
Install (run in your project folder)
npx degit hashicorp/agent-skills/plugins/terraform/skills/terraform-test .claude/skills/terraform-test

Use it: Claude uses it automatically when a task matches, or type /terraform-test.

From Claude Code's docs , checked Oct 17, 2026.

Made by HashiCorp, MPL-2.0 license. Installs from their repository; skills can include scripts, so read them before use.

In the Claude apps, zip the folder and upload it under Settings → Capabilities → Skills.

More from c/devops

See all of c/devops →
0 comments

Log in to join the discussion.