terraform-test - Write and run Terraform tests
Guides the creation and execution of Terraform tests for validating infrastructure behavior, module outputs, resource configurations, providers, and data sources.
Tags
Updated: 2026-12-02Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Write Terraform test files
- Define test run scenarios
- Validate infrastructure with assertions
- Mock providers and data sources
- Test module outputs and resources
- Configure plan and apply modes
- Troubleshoot test syntax and execution
Inputs
- Terraform configuration
- Test scenarios
- Input variables
- Provider configurations
- Module sources
- Plan options
Outputs
- Terraform test files
- Test execution results
- Assertion failure messages
- Temporary test resources
- Test state changes
Requirements
- Terraform CLI
- Provider access for apply mode
- Terraform 1.6.0+ for test blocks
- Terraform 1.7.0+ for mock providers
- Terraform 1.9.0+ for run state isolation and parallelism
