c/devops › command
0votes

Terraform tests (HashiCorp)

Skill
submitted by u/client to c/devops · 0 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

Skills are folders with a SKILL.md file. Claude loads one on its own when a task matches its description. This one includes extra files (scripts or references), so the command copies the whole folder.

Claude Code plugin (easiest, stays up to date)
/plugin marketplace add hashicorp/agent-skills
/plugin install terraform@hashicorp
Claude Code: for every project
npx degit hashicorp/agent-skills/plugins/terraform/skills/terraform-test ~/.claude/skills/terraform-test
Claude Code: this project only (commit it to share with your team)
npx degit hashicorp/agent-skills/plugins/terraform/skills/terraform-test .claude/skills/terraform-test

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.