aztfmod/terraform-provider-azurecaf/terraform-mock-test-2
Claude Code and agent skill by aztfmod/terraform-provider-azurecaf
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install aztfmod/terraform-provider-azurecaf/terraform-mock-test-2SKILL.md
Terraform Mock Test
Prerequisites
- Successfully built
terraform-provider-azurecafbinary (fromprovider-build-testskill) - Resource entry in
resourceDefinition.jsonwith knownmin_length,max_length,validation_regex
Procedure
1. Install provider locally
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
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/azurecafas provider source (notaztfmod.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
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. Lifecycle consistency check
After terraform test passes, verify plan→apply→plan consistency using a separate lifecycle test:
The final terraform plan must report "No changes". If it shows changes, there is a plan-apply inconsistency that must be fixed before proceeding.
Also verify that result is visible during the first plan (not showing (known after apply)) when random_seed is set.
8. Clean up
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.github/skills/terraform-mock-test/SKILL.md
Popularity
- Repository stars
- 184
- Repository forks
- 100
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 2 May 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aztfmod/terraform-provider-azurecaf/terraform-mock-test-2)