Comprehensive guide for writing and running Terraform tests with assertions, mocking, and module validation.
Automate repetitive workflows and reduce manual effort
Example: Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example: Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example: Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Time estimate: 15-45 minutes depending on use case complexity
Prerequisites
Submit your Claude Code skill and start earning
epx add hashicorp/agent-skills --skill terraform-testCompatible with
Supported agents
Write test files using .tftest.hcl syntax with run blocks that execute in plan or apply mode, supporting sequential and parallel execution with optional state isolation
Assert conditions on resource attributes, outputs, and data sources; use expect_failures to validate that invalid inputs are properly rejected
Mock providers (Terraform 1.7.0+) simulate infrastructure behavior
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionterraform-testExecute the skills CLI command in your project's root directory to begin installation:
epx add hashicorp/agent-skills --skill terraform-testFetches terraform-test from hashicorp/agent-skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
.cursor/skills/terraform-test
Restart Cursor to activate terraform-test. Access via /terraform-testin your agent's command palette.
Learn more:View source on GitHubSkills CLI docsAbout CursorWhat are agent skills?
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
terraform-stacks
hashicorp/agent-skills · Cloud · same repo
test-cases
cexll/myclaude · Testing · tag: test
dart-test-fundamentals
kevmoo/dash_skills · Testing · tag: test
code-testing-extensions
dotnet/skills · dotnet-test · tag: test
migrate-mstest-v1v2-to-v3
dotnet/skills · dotnet-test · tag: test
test-writer
leonardomso/33-js-concepts · Testing · tag: test
We added terraform-test from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
terraform-test has been reliable in day-to-day use. Documentation quality is above average for community skills.
Useful defaults in terraform-test — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
We added terraform-test from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
Useful defaults in terraform-test — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Solid pick for teams standardizing on skills: terraform-test is focused, and the summary matches what you get after install.
We added terraform-test from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
Solid pick for teams standardizing on skills: terraform-test is focused, and the summary matches what you get after install.
terraform-test has been reliable in day-to-day use. Documentation quality is above average for community skills.
Solid pick for teams standardizing on skills: terraform-test is focused, and the summary matches what you get after install.
showing 1-10 of 72