---
name: "tflint-module-rule-enforcer"
description: "Find possible errors, deprecated syntax, and enforce naming standards in Terraform."
metadata:
  author: "Terraform Linters"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "run tflint terraform"
  - "enforce aws tagging tflint"
  - "check invalid ec2 instance type"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# TFLint Pluggable Terraform Linter & AWS Guardrails

Extends Terraform validation with TFLint: verifying cloud resource attributes (invalid EC2 instance types), enforcing tagging conventions, and checking module pin versions.

## When to Invoke
Invoke this skill whenever you need to:
- run tflint terraform
- enforce aws tagging tflint
- check invalid ec2 instance type

## Execution SOP & Rules
1. Initialize TFLint plugins by running tflint --init.
2. Execute tflint --recursive to lint all nested Terraform modules in the repository.
3. Enforce tagging conventions using ruleset rules inside .tflint.hcl.
4. Resolve deprecated syntax warnings to ensure forward compatibility with newer Terraform engines.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
