terraform-validator

Validate and harden Terraform configurations with formatting, linting, and Checkov security scans.

Updated Apr 15, 2026
One-click install
npx skills add https://github.com/ToanPV90/dotfiles --skill terraform-validator-toanpv90
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-validator
Source: https://github.com/ToanPV90/dotfiles/tree/main/claude/.claude/skills/terraform-validator
Command: npx skills add https://github.com/ToanPV90/dotfiles --skill terraform-validator-toanpv90

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires terraform, tflint, checkov, bash, python3, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Terraform teams often ship broken or insecure infrastructure because validation, linting, security scanning, and provider documentation are performed manually and inconsistently, leading to late-stage failures and avoidable risks.

Core Features & Use Cases

  • End-to-end Terraform validation: Run formatting checks, initialize/validate configs, lint with tflint when available, and execute deterministic regression/smoke checks.
  • Security scanning with guided remediation: Execute Checkov scans and cross-reference every finding to a required security checklist with remediation patterns.
  • Provider-aware documentation lookup: Detect explicit and implicit providers and look up provider best-practice documentation via Context7 with WebSearch fallback when needed.

Use case: You want to validate an entire Terraform repo (including modules) before opening a PR by ensuring formatting, correctness, security findings mapped to remediation guidance, and a report that explains sources.

Quick Start

Use this skill to validate the Terraform directory at ./terraform by running the required wrapper-based workflow steps in order.

Frequently Asked Questions about terraform-validator

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

FAQPage Schema
How do I validate Terraform configurations before opening a pull request?

You can validate Terraform configurations by running formatting checks, initializing modules, linting with tflint, and executing regression checks to ensure correctness before a PR. This workflow applies formatting, linting, and validation across your .tf and HCL codebase.

What is the best way to run security scanning on HCL code and get remediation guidance?

Security scanning on HCL code uses Checkov to identify vulnerabilities and cross-references every finding to a required security checklist. This provides structured reporting with specific remediation patterns to guide you in fixing insecure Terraform configurations.

Do I need tflint and checkov installed to run Terraform validation workflows?

Yes, the workflow requires tflint and checkov alongside terraform, bash, and python3. These dependencies enable deterministic formatting, provider-aware linting, and security scanning for your infrastructure code.

How does provider documentation lookup work for implicit Terraform providers across modules?

Provider documentation lookup detects both explicit and implicit providers across your Terraform modules and resources. It retrieves best-practice documentation via Context7 with WebSearch fallback to ensure accurate provider-aware validation.

Can I use this workflow to check Terraform formatting and syntax across multiple modules?

Yes, the workflow applies end-to-end validation across an entire Terraform directory including modules. It runs deterministic formatting checks, initialization, and final regression/syntax checks to catch broken infrastructure code.

Why does my Terraform validation report include a security checklist cross-reference?

The validation report includes a security checklist cross-reference to map Checkov scan findings directly to remediation patterns. This structured reporting explains sources and ensures insecure configurations are resolved with guided fixes.