terraform-validation

Validate Terraform configurations with syntax, formatting, lint, and security checks.

1|Updated Dec 8, 2025
One-click install
npx skills add https://github.com/y-miyazaki/arc --skill terraform-validation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terraform-validation
Source: https://github.com/y-miyazaki/arc/tree/main/.github/skills/terraform-validation
Command: npx skills add https://github.com/y-miyazaki/arc --skill terraform-validation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires terraform, tflint, trivy, terraform-docs, and includes scripts (resource) components.

What problem does it solve?

This skill helps teams validate Terraform configurations to prevent misconfigurations and insecure patterns before deployment.

Core Features & Use Cases

  • Comprehensive validation workflow: initializes, validates, lints, and formats Terraform configurations.
  • Security and quality checks: uses tflint, JSON/YAML validation, and optional documentation generation.
  • Use Case: When preparing infrastructure projects for production, run the validation script to ensure all modules pass checks.

Quick Start

Run the validation script to validate all Terraform modules in the workspace: bash terraform-validation/scripts/validate.sh

Frequently Asked Questions about terraform-validation

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

FAQPage Schema
How do I validate Terraform configurations for security and syntax errors?

You can validate Terraform configurations by running a script that initializes, formats, lints with tflint, and checks security using trivy. This automated process prevents insecure setups and syntax misconfigurations before deployment.

What's the best way to lint Terraform modules across a multi-project workspace?

The best way to lint Terraform modules across a workspace is to run an automated validation script. It applies tflint and syntax checks across all modules to ensure infrastructure-as-code quality before production deployment.

Do I need tflint and trivy installed to run Terraform validation checks?

Yes, you need tflint and trivy installed to perform security and linting checks. Terraform is required for initialization and validation, while terraform-docs is an optional dependency for generating README documentation.

Can I generate documentation automatically when validating Terraform code?

Yes, you can generate documentation automatically during Terraform validation. The skill optionally uses terraform-docs to produce README files alongside syntax validation, formatting checks, and security linting for your modules.

Why does my Terraform deployment fail with insecure configuration patterns?

Deployments often fail due to insecure patterns that bypass manual review. Running automated checks with trivy and tflint detects these vulnerabilities and misconfigurations in your Terraform code before you apply changes.

Does this Terraform validation workflow support single modules and multi-project workspaces?

Yes, the validation workflow scales from single modules to multi-project workspaces. It executes init, validate, lint, and format checks across your entire infrastructure-as-code directory structure to prevent deployment failures.