terraform-test

terraform-test is a skill for Claude Code, Codex from Cloudgeni-ai/opengeni. It costs 59 tokens per session (2,729 once invoked), scanned A, a copy of terraform-test, Apache-2.0.

A guide to Terraform's built-in tests for checking infrastructure configuration. Terraform is a tool that describes and manages cloud and other infrastructure as code.

In plain words
What is it for?
Use it to write test files with scenarios and assertions, validate plans or temporary applied resources, simulate providers with supported mocks, and troubleshoot Terraform tests.
Why use it?
It helps catch configuration changes that could break expected behavior, resources, or infrastructure state before they cause problems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to write test files with scenarios and assertions, validate plans or temporary applied resources, simulate providers with supported mocks, and troubleshoot Terraform tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cloudgeni-ai/opengeni/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 Cloudgeni-ai/opengeni --skill terraform-test
Clone the repo
git clone --depth 1 https://github.com/Cloudgeni-ai/opengeni

Made for: Claude Code, Codex.

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 terraform-test

README.md
[![agentmods](https://agentmods.dev/badge/skills/cloudgeni-ai/opengeni/terraform-test/github.svg)](https://agentmods.dev/skills/cloudgeni-ai/opengeni/terraform-test)
Your own site
<a href="https://agentmods.dev/skills/cloudgeni-ai/opengeni/terraform-test"><img src="https://agentmods.dev/badge/skills/cloudgeni-ai/opengeni/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 terraform-test

Your own site · 80×15
<a href="https://agentmods.dev/skills/cloudgeni-ai/opengeni/terraform-test"><img src="https://agentmods.dev/badge/skills/cloudgeni-ai/opengeni/terraform-test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,729 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 91% copy Near-identical to another mod 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.00059 $0.02729
Opus 5 $0.00030 $0.01365
Sonnet 5 $0.00012 $0.00546
Haiku 4.5 $0.00006 $0.00273

Measured 9d ago against content hash f7b0c4d1e138, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

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 9d 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.

Origin

This is a copy

91% identical to terraform-test — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

packages/runtime/src/curated_skill_library/terraform-test/SKILL.md · 452 lines

How it starts

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

Terraform Test

Terraform's built-in testing framework validates that configuration updates don't introduce breaking changes. Tests run against temporary resources, protecting existing infrastructure and state files.

Reference Files

  • references/MOCK_PROVIDERS.md — Mock provider syntax, common defaults, when to use mocks (Terraform 1.7.0+ only — skip if the user's version is below 1.7)
  • references/CI_CD.md — GitHub Actions and GitLab CI pipeline examples
  • references/EXAMPLES.md — Complete example test suite (unit, integration, and mock tests for a VPC module)

Read the relevant reference file when the user asks about mocking, CI/CD integration, or wants a full example.

Core Concepts

  • Test file (.tftest.hcl / .tftest.json): Contains run blocks that validate your configuration
  • Run block: A single test scenario with optional variables, providers, and assertions
  • Assert block: Conditions that must be true for the test to pass
  • Mock provider: Simulates provider behavior without real infrastructure (Terraform 1.7.0+)
  • Test modes: apply (default, creates real resources) or plan (validates logic only)

File Structure

my-module/
├── main.tf
├── variables.tf
├── outputs.tf
└── tests/
    ├── defaults_unit_test.tftest.hcl         # plan mode — fast, no resources
    ├── validation_unit_test.tftest.hcl        # plan mode
    └── full_stack_integration_test.tftest.hcl # apply mode — creates real resources

Use *_unit_test.tftest.hcl for plan-mode tests and *_integration_test.tftest.hcl for apply-mode tests so they can be filtered separately in CI.

Test File Structure

# Optional: test-wide settings
test {
  parallel = true  # Enable parallel execution for all run blocks (default: false)
}

# Optional: file-level variables (highest precedence, override all other sources)
variables {
  aws_region    = "us-west-2"
  instance_type = "t2.micro"
}

# Optional: provider configuration
provider "aws" {
  region = var.aws_region
}

# Required: at least one run block
run "test_default_configuration" {
  command = plan

  assert {
    condition     = aws_instance.example.instance_type == "t2.micro"
    error_message = "Instance type should be t2.micro by default"
  }
}

Read the full file on GitHub · 452 lines

Files

What ships with it

3 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. 9d ago First seen · 452 lines · 59 tokens per session scan A f7b0c4d1e138

Subscribe to this mod's changes

terraform-test is a skill published in the GitHub repository Cloudgeni-ai/opengeni (125 stars, last pushed today), licensed Apache-2.0. It adds 59 tokens to every session and 2,729 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 91% identical to terraform-test, differing in 2 lines, and is treated as a copy.

Related

Other skills, from other repositories

credit-note-fixer

Fix the tiny credit-note formatting bug and rerun the exact targeted test command.

openai/openai-agents-python · 21 tokens

dawn

Build AI agents and workflows with the Dawn framework — the TypeScript meta-framework for LangGraph. Use when creating, editing, or debugging a Dawn app (routes, tools, state, agents, workflows, testing, deployment).

cacheplane/dawnai · 48 tokens

pn-systematic-debugging

Root cause analysis with triage mode — Phase 0 feedback loop, investigate first, one question max, then isolate, hypothesize, confirm. Outputs TDD fix plan with RED-GREEN cycles; optional GitHub issue via GitHub MCP. Use when debugging a failure or bug.

perniemann/pnCore · 63 tokens

pn-discipline-philosophy

Defines engineering discipline: test-first, root-cause before fix, minimal change, measure-before-optimize, review/second look, evidence over guess. Use when implementing features, debugging, planning, or establishing development practices. Aligns with TDD, systematic debugging, and RCA practices (current).

perniemann/pnCore · 66 tokens

adversarial-reviewer

Adversarial code review that assumes bugs exist and hunts for them. Use when asked to review code, find bugs, audit for correctness, stress-test a PR, or when someone says "tear this apart" or "what's wrong with this". Give no benefit of the doubt — every line is guilty until proven innocent.

emdash-cms/emdash · 71 tokens

bug-fixing

Fix defects in the Composio SDK repository with focused reproduction, root-cause analysis, regression tests, and narrow verification. Use when the user reports a bug, failing test, CI regression, runtime defect, or incorrect SDK behavior. Do not use for new feature design or broad refactors.

ComposioHQ/composio · 63 tokens