terraform-test
CommunityValidate Terraform modules, ensure infrastructure reliability.
AuthorCloudbrokerAz
Version1.0.0
Installs0
System Documentation
What problem does it solves?
This Skill provides a comprehensive guide to Terraform's native testing framework, enabling module authors to validate configuration updates and prevent breaking changes. It helps users write effective unit and integration tests, ensuring infrastructure reliability and reducing deployment risks.
Core Features & Use Cases
- Test File Creation: Guidance on creating
.tftest.hclfiles withtest,run, andassertblocks for various testing scenarios. - Unit & Integration Testing: Differentiates between
planmode (fast, no resources created) for unit tests andapplymode (real infrastructure validation) for integration tests. - Mock Providers: Explains how to simulate provider behavior for isolated, cost-free unit tests, accelerating feedback loops (requires Terraform 1.7.0+).
- Use Case: Develop a robust test suite for a new AWS VPC module, including unit tests for variable validation and output correctness, and integration tests to verify actual VPC creation and subnet configuration.
Quick Start
Explain how to write a unit test for a Terraform module that validates the vpc_id output is not empty and starts with 'vpc-', using command = plan.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: terraform-test Download link: https://github.com/CloudbrokerAz/ai-iac-consumer/archive/main.zip#terraform-test Please download this .zip file, extract it, and install it in the .claude/skills/ directory.