apex-terraform-test

apex-terraform-test is a skill for Claude Code from jonathan-vella/apex-accelerator. It costs 106 tokens per session (1,429 once invoked), scanned A, original, MIT.

A guide to Terraform's built-in testing framework. Terraform is a tool for declaring cloud infrastructure, and these tests check its configurations with assertions, simulated providers, plans, or real deployments.

In plain words
What is it for?
Use it to write .tftest.hcl files, test plans with mocked providers, check expected failures, and run integration tests that apply infrastructure.
Why use it?
It helps catch invalid module logic and input handling before infrastructure is created, while also supporting tests that verify deployed behaviour.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Good fit Use it to write .tftest.hcl files, test plans with mocked providers, check expected failures, and run integration tests that apply infrastructure.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jonathan-vella/apex-accelerator/apex-terraform-test
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jonathan-vella/apex-accelerator --skill apex-terraform-test
Clone the repo
git clone --depth 1 https://github.com/jonathan-vella/apex-accelerator

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for apex-terraform-test

README.md
[![agentmods](https://agentmods.dev/badge/skills/jonathan-vella/apex-accelerator/apex-terraform-test/github.svg)](https://agentmods.dev/skills/jonathan-vella/apex-accelerator/apex-terraform-test)
Your own site
<a href="https://agentmods.dev/skills/jonathan-vella/apex-accelerator/apex-terraform-test"><img src="https://agentmods.dev/badge/skills/jonathan-vella/apex-accelerator/apex-terraform-test/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for apex-terraform-test

Your own site · 80×15
<a href="https://agentmods.dev/skills/jonathan-vella/apex-accelerator/apex-terraform-test"><img src="https://agentmods.dev/badge/skills/jonathan-vella/apex-accelerator/apex-terraform-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,429 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00106 $0.01429
Opus 5.5 $0.00042 $0.00572
Sonnet 5.5 $0.00021 $0.00286
Haiku 4.5 $0.00011 $0.00143

Measured 29d ago against content hash a62f726cbd61, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

apex-terraform-test scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 29d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/skills/apex-terraform-test/SKILL.md · 138 lines

How it starts

The opening of the file, as written. The whole thing — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Terraform Test Skill

Write, organize, and run Terraform's built-in test framework for Azure infrastructure modules.

Reference: Terraform Testing Documentation


Quick Reference

Concept Description Min Version
Test file .tftest.hcl in tests/ directory 1.6
Run block Single test scenario with assertions 1.6
Assert block Condition that must be true for test to pass 1.6
Plan mode command = plan — validates logic, no resources created 1.6
Apply mode command = apply (default) — creates real infrastructure 1.6
Mock provider Simulates provider without real API calls 1.7
Parallel execution parallel = true on independent run blocks 1.9
Expect failures Verify validation rules reject invalid input 1.6

File Structure

my-module/
├── main.tf
├── variables.tf
├── outputs.tf
└── tests/
    ├── defaults_unit_test.tftest.hcl        # Plan mode (fast)
    ├── validation_unit_test.tftest.hcl      # Plan mode (fast)
    └── full_stack_integration_test.tftest.hcl  # Apply mode (creates resources)

Naming convention: *_unit_test.tftest.hcl (plan mode), *_integration_test.tftest.hcl (apply mode).

Test File Components

  • 0–1 test block (test-wide settings)
  • 1+ run blocks (test scenarios, sequential by default)
  • 0–1 variables block (file-level inputs, highest precedence)
  • 0+ provider blocks (provider configuration)
  • 0+ mock_provider blocks (simulated providers, TF 1.7+)

Canonical Example

See references/test-examples.md for a complete Azure Resource Group test (unit tests, tag validation, expect_failures).

Read the full file on GitHub · 138 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 29d ago First seen · 138 lines · 106 tokens per session scan A a62f726cbd61

Subscribe to this mod's changes

apex-terraform-test is a skill published in the GitHub repository jonathan-vella/apex-accelerator (50 stars, last pushed today), licensed MIT. It adds 106 tokens to every session and 1,429 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-23.