terraform-test

Run Terraform configuration tests with plan-mode and apply-mode assertions.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/kk0ga/terraform-aws-learning --skill terraform-test-kk0ga
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-test
Source: https://github.com/kk0ga/terraform-aws-learning/tree/main/.agents/skills/terraform-test
Command: npx skills add https://github.com/kk0ga/terraform-aws-learning --skill terraform-test-kk0ga

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the risk of introducing breaking changes in infrastructure-as-code by providing a framework to validate configurations before they are applied to real environments.

Core Features & Use Cases

  • Plan-Mode Validation: Run fast, credential-free unit tests using plan-mode to verify logic without creating resources.
  • Integration Testing: Execute apply-mode tests to ensure infrastructure behaves as expected in a real cloud environment.
  • Mocking: Simulate provider behavior to test complex modules without needing actual cloud credentials or external dependencies.

Quick Start

Use the terraform-test skill to run all unit tests in the current directory and display detailed output.

Frequently Asked Questions about terraform-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate Terraform configurations without creating real cloud resources?

You can validate Terraform configurations using plan-mode unit tests to verify logic quickly without provisioning resources or requiring cloud credentials. This approach checks your infrastructure-as-code reliability before applying changes to real environments.

What is the difference between plan-mode and apply-mode in Terraform testing?

Plan-mode runs fast, credential-free unit tests to verify configuration logic, while apply-mode executes integration tests to ensure infrastructure behaves as expected in a real cloud environment. Both modes validate Terraform code through automated test suites.

Do I need a specific Terraform version to use automated test suites with mock providers?

Yes, you need Terraform 1.7.0 or higher to utilize mock providers and the test framework capabilities. This version requirement enables the run blocks and assertions needed for infrastructure-as-code validation.

Can I test complex Terraform modules without actual cloud credentials?

Yes, you can simulate provider behavior using mocking to test complex modules without needing actual cloud credentials or external dependencies. This allows infrastructure-as-code validation in isolated environments.

How do I run Terraform automated tests and view detailed output?

Run all unit tests in your current directory using the test framework to execute run blocks and assertions, displaying detailed output of validation results. This validates your configurations through automated test suites.