terraform-validator

Validate, lint, and security-scan Terraform configurations and HCL files.

9|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/pantheon-org/tekhne --skill terraform-validator-pantheon-org
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-validator
Source: https://github.com/pantheon-org/tekhne/tree/main/skills/infrastructure/terraform/validator
Command: npx skills add https://github.com/pantheon-org/tekhne --skill terraform-validator-pantheon-org

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python-hcl2, checkov, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill ensures your Terraform configurations are syntactically correct, adhere to best practices, and meet security standards, preventing costly infrastructure errors and vulnerabilities.

Core Features & Use Cases

  • Validation: Checks Terraform syntax, initialization, and plan validity.
  • Linting & Formatting: Enforces code style with terraform fmt and tflint.
  • Security Scanning: Integrates checkov to identify security misconfigurations.
  • Provider Documentation: Automatically looks up provider documentation for better context.
  • Use Case: Before deploying a new VPC, use this Skill to automatically validate the Terraform code, check for common security misconfigurations like overly permissive security groups, and ensure it follows best practices.

Quick Start

Run the terraform-validator skill on the current directory to validate all Terraform files.

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 syntax and check security configurations before deployment?

To validate Terraform configurations, you can run a validation process that checks HCL syntax, enforces formatting with terraform fmt and tflint, and runs security scans using checkov to catch misconfigurations.

Can I use this to scan .tf and .tfvars files for infrastructure-as-code security issues?

Yes, it processes Terraform files including .tf and .tfvars to perform security scanning. It uses checkov to identify common infrastructure-as-code security misconfigurations like overly permissive security groups.

How do I lint HCL code to ensure it adheres to best practices?

Linting HCL code involves enforcing code style and best practices using tools like terraform fmt and tflint. This ensures your Terraform configurations are syntactically correct and follow standard formatting rules.

Does this work with custom Terraform providers and modules?

Yes, it supports working with custom providers and modules. It automatically looks up provider documentation to supply better context during validation and debugging of your Terraform configurations.

Why should I run a Terraform plan dry-run before applying changes?

Running a Terraform plan dry-run tests configuration validity and previews infrastructure changes without deploying. This debugging step prevents costly infrastructure errors by verifying the plan logic beforehand.

What is the best way to debug a failing Terraform plan?

Debugging a failing Terraform plan requires checking initialization, validating syntax, and reviewing provider contexts. This skill automates these checks to isolate configuration errors and security issues.