Agent skill

Terraform Mock Test

by aztfmod in aztfmod/terraform-provider-azurecaf

Validate a resource definition end-to-end using terraform test with mockprovider azurerm.

MITAuto-check passedDevOps & Cloud

Install Terraform Mock Test

skills CLI
$ npx skills add aztfmod/terraform-provider-azurecaf --skill terraform-mock-test -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aztfmod/terraform-provider-azurecaf terraform-mock-test --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aztfmod/terraform-provider-azurecaf.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/terraform-mock-test .claude/skills/terraform-mock-test && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
terraform-mock-test
GitHub stars
188
Token cost
~553 tokens
SKILL.md length
141 words
Files
2 (incl. references)
Skills in repo
22
Repo updated
First seen
Licence
MIT

At a glance

Validate a resource definition end-to-end using terraform test with mockprovider azurerm.

  • Works in 7 steps: Install provider locally → Look up azurerm resource attributes → Create test directory → …
  • Tasks that involve Infrastructure as code
  • SKILL.md covers Prerequisites and Procedure
  • Calls go and terraform

What it does

Terraform Mock Test is an agent skill from aztfmod/terraform-provider-azurecaf. Validate a resource definition end-to-end using terraform test with mockprovider azurerm. Proves the CAF-generated name is accepted by the azurerm provider schema without Azure credentials. Use after provider-build-test succeeds to run the mocked azurerm integration test.

Its SKILL.md is about 550 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/test-templates.md`).

It sits in DevOps & Cloud, covering Infrastructure as code and Integration testing. It works with Terraform and Microsoft Azure. The repository describes itself as: Terraform provider for the Terraform platform engineering for Azure. The licence is MIT.

When your agent uses it

  • Tasks that involve Infrastructure as code
  • Tasks that involve Integration testing

Example prompts

  • “/terraform-mock-test”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Install provider locally
  2. Look up azurerm resource attributes
  3. Create test directory
  4. Create test files
  5. Run test
  6. Validate results
  7. Clean up

What it can do on your machine

Read from SKILL.md and the folder at commit ac74615. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • go
    • terraform

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Terraform Mock Test loads about 553 tokens when it runs, and up to ~1.2k if it reads all its reference files. Until then it costs about 73 tokens; SKILL.md has 141 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~73
When it runs · the whole SKILL.md, loaded when a task matches
~553
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from aztfmod/terraform-provider-azurecaf at commit ac74615, republished under its MIT licence (© aztfmod). 141 words, ~553 tokens.

Download SKILL.mdSave it as .claude/skills/terraform-mock-test/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
terraform-mock-test
description
Validate a resource definition end-to-end using terraform test with mock_provider azurerm. Proves the CAF-generated name is accepted by the azurerm provider schema without Azure credentials. Use after provider-build-test succeeds to run the mocked azurerm integration test.

Terraform Mock Test

Prerequisites

  • Successfully built terraform-provider-azurecaf binary (from provider-build-test skill)
  • Resource entry in resourceDefinition.json with known min_length, max_length, validation_regex

Procedure

1. Install provider locally
bash
GOOS=$(go env GOOS) GOARCH=$(go env GOARCH)
LOCAL_PLUGIN_DIR=~/.terraform.d/plugins/aztfmod.com/arnaudlh/azurecaf/1.0.0/${GOOS}_${GOARCH}
mkdir -p "$LOCAL_PLUGIN_DIR"
cp ./terraform-provider-azurecaf "$LOCAL_PLUGIN_DIR/"
2. Look up azurerm resource attributes

Use Terraform MCP get_provider_details (provider_name: azurerm, provider_namespace: hashicorp, provider_document_type: resources, resource_name: <resource_name>).

Extract only Required arguments and Required nested blocks. Do NOT use Context7.

3. Create test directory
bash
mkdir -p /tmp/azurecaf-test-<resource_name>/tests
4. Create test files

See references/test-templates.md for the main.tf, terraform.rc, and tests/validate_name.tftest.hcl templates.

Key rules:

  • Use aztfmod/azurecaf as provider source (not aztfmod.com/arnaudlh/azurecaf)
  • Use hardcoded fake Azure resource IDs for parent references — do NOT chain azurerm resources
  • The azurerm resource MUST set name = azurecaf_name.test.result
5. Run test
bash
cd /tmp/azurecaf-test-<resource_name>
terraform init   # downloads azurerm provider schema
TF_CLI_CONFIG_FILE=/tmp/azurecaf-test-<resource_name>/terraform.rc terraform test -verbose

Always use -verbose to show generated name, resource state, and output values.

6. Validate results

The Outputs: section must show non-empty result and result_length. If empty, assertions are not using output.result — fix them.

7. Clean up
bash
rm -rf /tmp/azurecaf-test-<resource_name>

© aztfmod, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .github/skills/terraform-mock-test of aztfmod/terraform-provider-azurecaf.

  • SKILL.md
  • references/test-templates.md

Open the folder on GitHubat commit ac74615

Compare with similar skills

Terraform Mock Test next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Terraform Mock Test compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Terraform Mock Test this skillaztfmod/terraform-provider-azurecaf188—~553Automated safety check: PassMIT
Avm Tf TestingAzure/terraform-azurerm-avm-ptn-alz135—~1.8kAutomated safety check: PassMIT
Terravision Cloud Diagramspatrickchugh/terravision1.6k—~5.6kAutomated safety check: NotesAGPL-3.0-only
TerrasharkLukasNiessen/terrashark715—~843Automated safety check: PassMIT
Provider Verificationmondoohq/mql412—~3.7kAutomated safety check: PassCustom licence
Avm Tf AzapiAzure/terraform-azurerm-avm-ptn-alz135—~2.9kAutomated safety check: PassMIT

Similar skills

  • Avm Tf Testing

    Azure/terraform-azurerm-avm-ptn-alz

    Official

    A skill your agent uses for AVM Terraform validation, provider-mocked unit tests, real-Azure integration tests, E2E example tests, PowerShell hooks, OIDC, policy checks, and Avm.Authoring CI behavior.

    135 GitHub stars~1.8k tokensUpdated 3 days ago
    Testing & QAAuto-check passed
  • Terravision Cloud Diagrams

    patrickchugh/terravision

    Draw cloud architecture diagrams for AWS, Azure or GCP with the official provider icon sets, using TerraVision.

    1.6k GitHub stars~5.6k tokensUpdated 3 days ago
    DevOps & CloudAuto-check: notes
  • Terrashark

    LukasNiessen/terrashark

    Prevent Terraform/OpenTofu hallucinations by diagnosing and fixing failure modes: identity churn, secret exposure, blast-radius mistakes, CI drift, and compliance gate gaps.

    715 GitHub stars~843 tokensUpdated 7 days ago
    DevOps & CloudAuto-check passed
  • Verify mql provider resource/field changes against real cloud infrastructure.

    412 GitHub stars~3.7k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Avm Tf Azapi

    Azure/terraform-azurerm-avm-ptn-alz

    Official

    A skill your agent uses for AVM Terraform AzAPI resources, provider constraints, ARM schemas, parent IDs, resource types, retries, timeouts, response exports, replacement triggers, and…

    135 GitHub stars~2.9k tokensUpdated 3 days ago
    DevOps & CloudAuto-check passed
  • Tirith Migrate

    StackGuardian/tirith

    Translate existing policy-as-code into Tirith policies. An agent skill from StackGuardian/tirith.

    170 GitHub stars~1.7k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed

More from aztfmod/terraform-provider-azurecaf

All 22 skills in this repo
  • Azure Caf Sync

    aztfmod/terraform-provider-azurecaf

    Fetch the latest CAF abbreviations page from Microsoft Learn and compare against resourceDefinition.json official.slug values.

    188 GitHub stars~464 tokensUpdated 18 days ago
    Auto-check passed
  • Changelog Update

    aztfmod/terraform-provider-azurecaf

    Update CHANGELOG.md with a new entry under the correct section.

    188 GitHub stars~642 tokensUpdated 18 days ago
    Auto-check passed
  • Docs Resource Sync

    aztfmod/terraform-provider-azurecaf

    Ensure documentation files under docs/resources/ and docs/data-sources/ reflect current resource types with accurate examples.

    188 GitHub stars~469 tokensUpdated 18 days ago
    Auto-check passed
  • Issue To Resource Spec

    aztfmod/terraform-provider-azurecaf

    Parse a 'new resource request' GitHub issue and extract the resource type, slug, and naming constraints to produce a draft resourceDefinition.json entry.

    188 GitHub stars~452 tokensUpdated 18 days ago
    Auto-check passed
  • Naming Rules Drift Check

    aztfmod/terraform-provider-azurecaf

    Re-fetch Azure naming rules for a set of resources and compare against current regex/length/scope values in resourceDefinition.json.

    188 GitHub stars~507 tokensUpdated 18 days ago
    Auto-check passed
  • Resource Bulk Import

    aztfmod/terraform-provider-azurecaf

    Accept a list of Azure resource types, batch-research each via azure-naming-research conventions, generate JSON entries, and insert all into resourceDefinition.json.

    188 GitHub stars~476 tokensUpdated 18 days ago
    Auto-check passed

Categories

Questions about Terraform Mock Test

What does Terraform Mock Test do?

Validate a resource definition end-to-end using terraform test with mockprovider azurerm. Terraform Mock Test is an agent skill from aztfmod/terraform-provider-azurecaf. Validate a resource definition end-to-end using terraform test with mockprovider azurerm.

When should I use Terraform Mock Test?

Terraform Mock Test fits situations like: tasks that involve Infrastructure as code; tasks that involve Integration testing.

How do I install Terraform Mock Test in Claude Code?

Run `npx skills add aztfmod/terraform-provider-azurecaf --skill terraform-mock-test -a claude-code`. Or copy the skill folder (.github/skills/terraform-mock-test in aztfmod/terraform-provider-azurecaf) into .claude/skills/terraform-mock-test in your project. Claude Code loads it when a task matches its description.

How do I install Terraform Mock Test in Codex?

Run `npx skills add aztfmod/terraform-provider-azurecaf --skill terraform-mock-test -a codex`. Or copy the skill folder (.github/skills/terraform-mock-test in aztfmod/terraform-provider-azurecaf) into .agents/skills/terraform-mock-test in your project. Codex loads it when a task matches its description.

Can I use Terraform Mock Test in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aztfmod/terraform-provider-azurecaf --skill terraform-mock-test -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/terraform-mock-test, .gemini/skills/terraform-mock-test, .github/skills/terraform-mock-test and .opencode/skills/terraform-mock-test in your project.

What does Terraform Mock Test need to run?

Going by SKILL.md and its folder, Terraform Mock Test needs the command-line tools its instructions call (go and terraform).

Does Terraform Mock Test access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Terraform Mock Test safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Terraform Mock Test use?

Terraform Mock Test is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Terraform Mock Test use?

About 553 tokens (SKILL.md is roughly 2.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 618 tokens, read only when the agent opens those files.

What are the alternatives to Terraform Mock Test?

Skills that share tags, products or a category with Terraform Mock Test: Avm Tf Testing (Azure/terraform-azurerm-avm-ptn-alz, 135 stars), Terravision Cloud Diagrams (patrickchugh/terravision, 1.6k stars), Terrashark (LukasNiessen/terrashark, 715 stars) and Provider Verification (mondoohq/mql, 412 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Terraform Mock Test?

aztfmod (a GitHub organization) maintains it in aztfmod/terraform-provider-azurecaf, which has 188 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on September 21, 2026.

Source: aztfmod/terraform-provider-azurecaf on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.