terraform-test - Write and run Terraform tests
Write and run Terraform tests using test files, run blocks, assertions, provider mocks, module checks, and plan or apply modes.
Tags
Updated: 2026-12-02Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Create Terraform test files
- Define test run blocks
- Write validation assertions
- Mock providers and data sources
- Test module outputs
- Validate resource configurations
- Run plan-mode tests
- Run apply-mode tests
- Test expected failures
- Configure plan options
Inputs
- Terraform configuration
- Test scenarios
- Variable values
- Provider configurations
- Module sources
- Terraform test files
Outputs
- Test pass or fail results
- Assertion failure messages
- Temporary test resources
- Validation status
Requirements
- Terraform CLI with built-in test framework
- Provider configuration for tested infrastructure
