Terraform and OpenTofu Guide
agentscope-ai/QwenPaw
Guidance for writing and testing Terraform and OpenTofu code: module structure, naming, test approaches, CI/CD workflows, state handling and security scanning.
Validate, lint, audit, or plan Terraform/.tf/HCL files; runs tflint, checkov, terraform validate.
$ npx skills add akin-ozer/cc-devops-skills --skill terraform-validator -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install akin-ozer/cc-devops-skills terraform-validator --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/akin-ozer/cc-devops-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/devops-skills-plugin/skills/terraform-validator .claude/skills/terraform-validator && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "terraform-validator" agent skill from https://github.com/akin-ozer/cc-devops-skills/tree/main/devops-skills-plugin/skills/terraform-validator into .claude/skills/terraform-validator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "terraform-validator", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/akin-ozer/cc-devops-skills/tree/main/devops-skills-plugin/skills/terraform-validatorType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add akin-ozer/cc-devops-skills --skill terraform-validator -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install akin-ozer/cc-devops-skills terraform-validator --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/akin-ozer/cc-devops-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/devops-skills-plugin/skills/terraform-validator .agents/skills/terraform-validator && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "terraform-validator" agent skill from https://github.com/akin-ozer/cc-devops-skills/tree/main/devops-skills-plugin/skills/terraform-validator into .agents/skills/terraform-validator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "terraform-validator", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add akin-ozer/cc-devops-skills --skill terraform-validator -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install akin-ozer/cc-devops-skills terraform-validator --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/akin-ozer/cc-devops-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/devops-skills-plugin/skills/terraform-validator .cursor/skills/terraform-validator && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "terraform-validator" agent skill from https://github.com/akin-ozer/cc-devops-skills/tree/main/devops-skills-plugin/skills/terraform-validator into .cursor/skills/terraform-validator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "terraform-validator", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/akin-ozer/cc-devops-skills.git --path devops-skills-plugin/skills/terraform-validator--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add akin-ozer/cc-devops-skills --skill terraform-validator -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install akin-ozer/cc-devops-skills terraform-validator --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/akin-ozer/cc-devops-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/devops-skills-plugin/skills/terraform-validator .gemini/skills/terraform-validator && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "terraform-validator" agent skill from https://github.com/akin-ozer/cc-devops-skills/tree/main/devops-skills-plugin/skills/terraform-validator into .gemini/skills/terraform-validator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "terraform-validator", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install akin-ozer/cc-devops-skills terraform-validatorInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add akin-ozer/cc-devops-skills --skill terraform-validator -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/akin-ozer/cc-devops-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/devops-skills-plugin/skills/terraform-validator .github/skills/terraform-validator && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "terraform-validator" agent skill from https://github.com/akin-ozer/cc-devops-skills/tree/main/devops-skills-plugin/skills/terraform-validator into .github/skills/terraform-validator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "terraform-validator", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add akin-ozer/cc-devops-skills --skill terraform-validator -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install akin-ozer/cc-devops-skills terraform-validator --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/akin-ozer/cc-devops-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/devops-skills-plugin/skills/terraform-validator .opencode/skills/terraform-validator && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "terraform-validator" agent skill from https://github.com/akin-ozer/cc-devops-skills/tree/main/devops-skills-plugin/skills/terraform-validator into .opencode/skills/terraform-validator/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "terraform-validator", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
terraform-validatorValidate, lint, audit, or plan Terraform/.tf/HCL files; runs tflint, checkov, terraform validate.
Terraform Validator is an agent skill from akin-ozer/cc-devops-skills. Validate, lint, audit, or plan Terraform/.tf/HCL files; runs tflint, checkov, terraform validate.
Its SKILL.md is about 4.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 14 other files, including scripts and reference files (for example `references/advanced_features.md`, `references/best_practices.md` and `references/common_errors.md`).
It sits in DevOps & Cloud, covering Infrastructure as code. It works with Terraform. The repository describes itself as: DevOps skills for Claude Code and Codex. The licence is Apache-2.0.
2 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 276af75. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 4 files in scripts/ (Shell and Python), which the agent can run.
Shell commands in SKILL.md call:
bashterraformpython3From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
github.comdeveloper.hashicorp.comcheckov.ioaquasecurity.github.ioFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Terraform Validator loads about 4.9k tokens when it runs, and up to ~19k if it reads all its reference files. Until then it costs about 29 tokens; SKILL.md has 1,104 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from akin-ozer/cc-devops-skills at commit 276af75, republished under its Apache-2.0 licence (© akin-ozer). 1,104 words, ~4,946 tokens.
.claude/skills/terraform-validator/SKILL.md (or your agent's skills folder). This skill also uses 11 other files; get the full folder from GitHub.Comprehensive toolkit for validating, linting, and testing Terraform configurations with automated workflows for syntax validation, security scanning, and intelligent documentation lookup.
STOP: You MUST complete these steps in order. Do NOT skip any REQUIRED step.
| Step | Action | Required |
|---|---|---|
| 1 | Run bash scripts/extract_tf_info_wrapper.sh <path> | ✅ REQUIRED |
| 2 | Context7 lookup for ALL providers (explicit AND implicit); WebSearch fallback if not found | ✅ REQUIRED |
| 3 | READ references/security_checklist.md | ✅ REQUIRED |
| 4 | READ references/best_practices.md | ✅ REQUIRED |
| 5 | Run terraform fmt | ✅ REQUIRED |
| 6 | Run tflint (or note as skipped if unavailable) | Recommended |
| 7 | Run terraform init (if not initialized) | ✅ REQUIRED |
| 8 | Run terraform validate | ✅ REQUIRED |
| 9 | Run bash scripts/run_checkov.sh <path> | ✅ REQUIRED |
| 10 | Cross-reference findings with security_checklist.md sections | ✅ REQUIRED |
| 11 | Generate report citing reference files | ✅ REQUIRED |
| 12 | Run regression tests (bash tests/test_regression.sh) | ✅ REQUIRED |
| 13 | Run lightweight CI checks (bash -n, py_compile, smoke) | ✅ REQUIRED |
IMPORTANT: Steps 3-4 (reading reference files) must be completed BEFORE running security scans. The reference files contain remediation patterns that MUST be cited in your report.
Context7 Fallback: If Context7 does not have a provider (common for: random, null, local, time, tls), use WebSearch:
"terraform-provider-{name} hashicorp documentation"
.tf, .tfvars, .tfstate)terraform plan| Tool | Documentation |
|---|---|
| Terraform | developer.hashicorp.com/terraform |
| TFLint | github.com/terraform-linters/tflint |
| Checkov | checkov.io |
| Trivy | aquasecurity.github.io/trivy |
IMPORTANT: Follow this workflow in order. Each step is REQUIRED unless explicitly marked optional.
1. Identify Terraform files in scope
├─> Single file, directory, or multi-environment
2. Extract Provider/Module Info (REQUIRED)
├─> MUST run: bash scripts/extract_tf_info_wrapper.sh <path>
├─> Parse output for providers and modules
└─> Use for Context7 documentation lookup
3. Lookup Provider Documentation (REQUIRED)
├─> For EACH provider detected:
│ ├─> mcp__context7__resolve-library-id with "terraform-provider-{name}"
│ ├─> mcp__context7__query-docs for version-specific guidance
│ └─> If NOT found in Context7: WebSearch fallback (see below)
└─> Note any custom/private providers for WebSearch
4. Read Reference Files (REQUIRED before validation)
├─> MUST READ: references/security_checklist.md (before security scan)
├─> MUST READ: references/best_practices.md (for structure validation)
└─> Reference common_errors.md if errors occur
5. Format and Lint (REQUIRED)
├─> MUST run: terraform fmt -recursive (auto-fix formatting)
├─> MUST run: terraform fmt -check -recursive (verify no drift)
├─> RUN: tflint (or note as skipped if unavailable)
└─> Report formatting issues
6. Syntax Validation (REQUIRED)
├─> MUST run: terraform init (if not initialized)
├─> MUST run: terraform validate
└─> Report syntax errors (consult common_errors.md)
7. Security Scanning (REQUIRED)
├─> MUST run: bash scripts/run_checkov.sh <path>
├─> Analyze policy violations against security_checklist.md
└─> Suggest remediations from reference
8. Dry-Run Testing (if credentials available)
├─> terraform plan
├─> Analyze planned changes
└─> Report potential issues
9. Regression and Wrapper Determinism Checks (REQUIRED)
├─> MUST run: bash tests/test_regression.sh
├─> Confirms parser error handling returns non-zero
├─> Confirms implicit provider detection for docs lookup
├─> Confirms wrapper argument handling is deterministic
└─> Confirms checkov wrapper preserves scanner exit code
10. Lightweight CI Checks (REQUIRED)
├─> MUST run: bash -n scripts/*.sh
├─> MUST run: python3 -m py_compile scripts/*.py
├─> MUST run: smoke check for extract wrapper on sample fixture
└─> Record command outputs and exit codes
11. Generate Comprehensive Report
├─> Include all findings with severity
├─> Reference best_practices.md for recommendations
└─> Offer to fix issues if appropriateYou MUST read these reference files during validation:
| When | Reference File | Action |
|---|---|---|
| Before security scan | references/security_checklist.md | Read to understand security checks and remediation patterns |
| During validation | references/best_practices.md | Read to validate project structure, naming, and patterns |
| If errors occur | references/common_errors.md | Read to find solutions for specific error messages |
| If using Terraform 1.10+ | references/advanced_features.md | Read to understand ephemeral values, actions, list resources |
You MUST use these wrapper scripts instead of calling tools directly:
| Task | Script | Command |
|---|---|---|
| Extract provider/module info | extract_tf_info_wrapper.sh | bash scripts/extract_tf_info_wrapper.sh <path> |
| Run security scan | run_checkov.sh | bash scripts/run_checkov.sh <path> |
| Install checkov (if missing) | install_checkov.sh | bash scripts/install_checkov.sh install |
Note:
extract_tf_info_wrapper.shautomatically handles the python-hcl2 dependency. If system Python lackspython-hcl2, it creates/reuses a cached virtual environment under~/.cache/terraform-validator/by default.
devops-skills-plugin/skills/terraform-validatorbash /absolute/path/to/terraform-validator/scripts/extract_tf_info_wrapper.sh <path>bash /absolute/path/to/terraform-validator/scripts/run_checkov.sh <path>bash /absolute/path/to/terraform-validator/scripts/install_checkov.sh installFor EVERY provider detected, you MUST lookup documentation via Context7:
1. Run extract_tf_info_wrapper.sh to get provider list
2. For each provider (e.g., "aws", "google", "azurerm"):
a. Call: mcp__context7__resolve-library-id with "terraform-provider-{name}"
b. Call: mcp__context7__query-docs with the resolved ID
c. Note version-specific features and constraints
3. Include relevant provider guidance in validation reportExample for AWS provider:
mcp__context7__resolve-library-id("terraform-provider-aws")
mcp__context7__query-docs(context7CompatibleLibraryID, "best practices")If Context7 does not find a provider, you MUST fall back to WebSearch:
1. If mcp__context7__resolve-library-id returns no results or provider not found:
a. Use WebSearch with query: "terraform-provider-{name} hashicorp documentation"
b. For specific version: "terraform-provider-{name} {version} documentation site:registry.terraform.io"
2. Common providers NOT in Context7 (use WebSearch directly):
- random (hashicorp/random)
- null (hashicorp/null)
- local (hashicorp/local)
- time (hashicorp/time)
- tls (hashicorp/tls)
3. Document in report: "Provider docs via WebSearch (not in Context7)"WebSearch Fallback Example:
# If Context7 fails for random provider:
WebSearch("terraform-provider-random hashicorp documentation site:registry.terraform.io")Note: HashiCorp utility providers (random, null, local, time, tls, archive, external, http) may not be indexed in Context7. Always fall back to WebSearch for these.
IMPORTANT: Providers can be used without being declared in required_providers. You MUST detect ALL providers:
required_providers block (from extract_tf_info_wrapper.sh output)| Resource Type Prefix | Provider Name | Context7 Lookup |
|---|---|---|
random_* | random | terraform-provider-random |
null_* | null | terraform-provider-null |
local_* | local | terraform-provider-local |
tls_* | tls | terraform-provider-tls |
time_* | time | terraform-provider-time |
archive_* | archive | terraform-provider-archive |
http (data source) | http | terraform-provider-http |
external (data source) | external | terraform-provider-external |
1. Parse extract_tf_info_wrapper.sh output
2. Get providers from "providers" array (explicit)
3. Get resources from "resources" array
4. For EACH resource type:
a. Extract prefix (e.g., "random" from "random_id")
b. Check if already in providers list
c. If NOT in providers: add as implicit provider
5. Perform Context7 lookup for ALL providers (explicit + implicit)If extract_tf_info_wrapper.sh returns:
{
"providers": [{"name": "aws", ...}],
"resources": [
{"type": "aws_instance", ...},
{"type": "random_id", ...}
]
}You MUST lookup BOTH:
terraform-provider-aws (explicit)terraform-provider-random (implicit - detected from random_id resource)# Check formatting (dry-run)
terraform fmt -check -recursive .
# Apply formatting
terraform fmt -recursive .
# Run tflint (requires .tflint.hcl config)
tflint --init # Install plugins
tflint --recursive # Lint all modules
tflint --format compact # Compact outputTFLint Configuration: See TFLint Ruleset documentation for plugin setup.
# Initialize (downloads providers and modules)
terraform init
# Validate syntax
terraform validate
# Validate with JSON output
terraform validate -jsonMUST use wrapper script:
# Use the wrapper script (REQUIRED)
bash scripts/run_checkov.sh ./terraform
# With specific options
bash scripts/run_checkov.sh -f json ./terraform
bash scripts/run_checkov.sh --compact ./terraformDetailed Security Scanning: You MUST read
references/security_checklist.mdbefore running security scans to understand the checks and remediation patterns.
When reporting security findings, you MUST cite specific sections from security_checklist.md:
| Checkov Check Pattern | security_checklist.md Section |
|---|---|
CKV_AWS_24 (SSH open) | "Overly Permissive Security Groups" |
CKV_AWS_260 (HTTP open) | "Overly Permissive Security Groups" |
CKV_AWS_16 (RDS encryption) | "Encryption at Rest" |
CKV_AWS_17 (RDS public) | "RDS Databases" |
CKV_AWS_130 (public subnet) | "Network Security" |
CKV_AWS_53-56 (S3 public access) | "Public S3 Buckets" |
CKV_AWS_* (IAM) | "IAM Security" |
CKV_AWS_79 (IMDSv1) | "ECS/EKS" |
| Hardcoded passwords | "Hardcoded Credentials" |
| Sensitive outputs | "Sensitive Output Exposure" |
### Security Issue: [Check ID]
**Finding:** [Description from checkov]
**Resource:** [Resource name and file:line]
**Severity:** [HIGH/MEDIUM/LOW]
**Reference:** security_checklist.md - "[Section Name]"
**Remediation Pattern:**
[Copy relevant code example from security_checklist.md]
**Recommended Fix:**
[Specific fix for this configuration]### Security Issue: CKV_AWS_24
**Finding:** Security group allows SSH from 0.0.0.0/0
**Resource:** aws_security_group.web (main.tf:47-79)
**Severity:** HIGH
**Reference:** security_checklist.md - "Overly Permissive Security Groups"
**Remediation Pattern (from reference):**
```hcl
variable "admin_cidr" {
description = "CIDR block for admin access"
type = string
}
resource "aws_security_group" "app" {
ingress {
description = "SSH from admin network only"
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = [var.admin_cidr]
}
}
```
**Recommended Fix:** Replace `cidr_blocks = ["0.0.0.0/0"]` with a variable or specific CIDR range.# Generate execution plan
terraform plan
# Save plan to file
terraform plan -out=tfplan
# Plan with specific var file
terraform plan -var-file="production.tfvars"
# Plan with target resource
terraform plan -target=aws_instance.examplePlan Output Symbols:
+ Resources to be created- Resources to be destroyed~ Resources to be modified-/+ Resources to be replacedWhen validation tools are not installed, follow this recovery workflow:
1. Detect missing tool
2. Inform user what is missing and why it's needed
3. Provide installation command
4. ASK user: "Would you like me to install [tool] and continue?"
5. If yes: Run installation and RERUN the validation step
6. If no: Note as skipped in report, continue with available toolsIf checkov is missing:
1. Inform: "Checkov is not installed. It's required for security scanning."
2. Ask: "Would you like me to install it? I'll use: bash scripts/install_checkov.sh install"
3. If yes: Run install script, then rerun security scanIf tflint is missing:
1. Inform: "TFLint is not installed. It provides advanced linting beyond terraform validate."
2. Ask: "Would you like me to install it?"
3. Provide: brew install tflint (macOS) or installation script (Linux)If python-hcl2 is missing:
The extract_tf_info_wrapper.sh script handles this automatically by creating
or reusing a cached venv. No user action required.Required tools: terraform fmt, terraform init, terraform validate
Required for full security validation: checkov
Optional but recommended: tflint
| Script | Purpose | Usage |
|---|---|---|
extract_tf_info_wrapper.sh | Parse Terraform files for providers/modules (auto-handles dependencies) | bash scripts/extract_tf_info_wrapper.sh <path> |
extract_tf_info.py | Core parser (requires python-hcl2) | Use wrapper instead |
run_checkov.sh | Wrapper for Checkov scans with enhanced output | bash scripts/run_checkov.sh <path> |
install_checkov.sh | Install Checkov in isolated venv | bash scripts/install_checkov.sh install |
MUST READ during validation workflow:
| Reference | When to Read | Content |
|---|---|---|
references/security_checklist.md | Before security scan | Security validation, Checkov/Trivy usage, common policies, remediation patterns |
references/best_practices.md | During validation | Project structure, naming conventions, module design, state management |
references/common_errors.md | When errors occur | Error database with causes and solutions |
references/advanced_features.md | If Terraform >= 1.10 | Ephemeral values (1.10+), Actions (1.14+), List Resources (1.14+) |
1. MUST: bash scripts/extract_tf_info_wrapper.sh main.tf
2. MUST: Context7 lookup for each provider detected
3. MUST: Read references/security_checklist.md
4. MUST: Read references/best_practices.md
5. RUN: terraform fmt -check main.tf
6. RUN: terraform init (if needed) && terraform validate
7. MUST: bash scripts/run_checkov.sh -f json main.tf
8. Report issues with remediation from references
9. If custom providers: WebSearch for documentation1. Identify all .tf files in directory
2. MUST: bash scripts/extract_tf_info_wrapper.sh ./modules/vpc/
3. MUST: Context7 lookup for ALL providers
4. MUST: Read references/security_checklist.md
5. MUST: Read references/best_practices.md
6. RUN: terraform fmt -recursive
7. RUN: tflint --recursive (or note as skipped if unavailable)
8. RUN: terraform init && terraform validate
9. MUST: bash scripts/run_checkov.sh ./modules/vpc/
10. Analyze findings against security_checklist.md
11. Validate structure against best_practices.md
12. Provide comprehensive report with references1. Verify terraform initialized
2. MUST: Read references/security_checklist.md (production focus)
3. RUN: terraform plan -var-file="production.tfvars"
4. Analyze for unexpected changes
5. Highlight create/modify/destroy operations
6. Flag security concerns (compare with security_checklist.md)
7. Recommend whether safe to applyTerraform 1.10+ introduces ephemeral values for secure secrets management. Terraform 1.14+ adds Actions for imperative operations and List Resources for querying infrastructure.
MUST READ: references/advanced_features.md when:
ephemeral blocksaction blocks.tfquery.hcl filesbash tests/test_regression.sh after script changesbash -n scripts/*.sh and python3 -m py_compile scripts/*.pybash -n, py_compile, smoke checks) pass before final reporting.© akin-ozer, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 11 other files (scripts, references) in devops-skills-plugin/skills/terraform-validator of akin-ozer/cc-devops-skills.
Open the folder on GitHubat commit 276af75
Terraform Validator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Terraform Validator this skillakin-ozer/cc-devops-skills | 320 | — | ~4.9k | Automated safety check: Pass | Apache-2.0 | |
| Terraform and OpenTofu Guideagentscope-ai/QwenPaw | 36k | 6 repos | ~4.2k | Automated safety check: Pass | Apache-2.0 | |
| Terraform Skillantonbabenko/terraform-skill | 2.4k | 1 repos | ~5.1k | Automated safety check: Pass | Apache-2.0 | |
| Review Docshashicorp/terraform-provider-aws | 11k | — | ~1.3k | Automated safety check: Pass | MPL-2.0 | |
| Senior DevOps Toolkitmaslennikov-ig/claude-code-orchestrator-kit | 260 | 6 repos | ~1.1k | Automated safety check: Notes | Custom licence | |
| Cloudflarehodgef/apiker | 127 | 7 repos | ~2.2k | Automated safety check: Pass | MIT |
agentscope-ai/QwenPaw
Guidance for writing and testing Terraform and OpenTofu code: module structure, naming, test approaches, CI/CD workflows, state handling and security scanning.
antonbabenko/terraform-skill
A skill your agent uses when writing, reviewing, or debugging Terraform/OpenTofu modules, tests, CI, scans, or state ops - diagnoses failure mode (identity churn, secrets, blast radius, CI drift…
hashicorp/terraform-provider-aws
Review a Terraform AWS Provider PR's end-user documentation (website/docs//.markdown): whether docs are needed, description openings, argument/attribute style, section structure, tags wording, code…
maslennikov-ig/claude-code-orchestrator-kit
Comprehensive DevOps skill for CI/CD, infrastructure automation, containerization, and cloud platforms (AWS, GCP, Azure). Includes pipeline setup…
hodgef/apiker
Comprehensive Cloudflare platform skill covering Workers, Pages, storage (KV, D1, R2), AI (Workers AI, Vectorize, Agents SDK), feature flags (Flagship), networking (Tunnel, Spectrum), security (WAF…
patrickchugh/terravision
Draw cloud architecture diagrams for AWS, Azure or GCP with the official provider icon sets, using TerraVision.
akin-ozer/cc-devops-skills
Create, generate, or scaffold GitHub Actions workflows, action.yml, or .github/workflows CI/CD pipelines.
akin-ozer/cc-devops-skills
Create, scaffold, or generate Helm charts, Chart.yaml, values.yaml, templates, helpers.
akin-ozer/cc-devops-skills
Generate/create/scaffold Jenkinsfile — declarative, scripted, shared library, CI/CD pipelines.
akin-ozer/cc-devops-skills
Validate, lint, audit, or scan a Dockerfile for security and best practices.
akin-ozer/cc-devops-skills
Validate, lint, audit, fix GitHub Actions workflows (.github/workflows).
akin-ozer/cc-devops-skills
Validate, lint, audit, or check Jenkinsfiles and shared libraries.
Works with
Categories
Validate, lint, audit, or plan Terraform/.tf/HCL files; runs tflint, checkov, terraform validate. Terraform Validator is an agent skill from akin-ozer/cc-devops-skills.tf/HCL files; runs tflint, checkov, terraform validate.
Terraform Validator fits situations like: tasks that involve Infrastructure as code.
Run `npx skills add akin-ozer/cc-devops-skills --skill terraform-validator -a claude-code`. Or copy the skill folder (devops-skills-plugin/skills/terraform-validator in akin-ozer/cc-devops-skills) into .claude/skills/terraform-validator in your project. Claude Code loads it when a task matches its description.
Run `npx skills add akin-ozer/cc-devops-skills --skill terraform-validator -a codex`. Or copy the skill folder (devops-skills-plugin/skills/terraform-validator in akin-ozer/cc-devops-skills) into .agents/skills/terraform-validator in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add akin-ozer/cc-devops-skills --skill terraform-validator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/terraform-validator, .gemini/skills/terraform-validator, .github/skills/terraform-validator and .opencode/skills/terraform-validator in your project.
Going by SKILL.md and its folder, Terraform Validator needs a shell and Python for the scripts in its folder and the command-line tools its instructions call (bash, terraform and python3). Our summary lists: Python 3; A Bash shell.
SKILL.md names 4 domains. As links in the text: github.com, developer.hashicorp.com, checkov.io and aquasecurity.github.io. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Terraform Validator is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.9k tokens (SKILL.md is roughly 20k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 14k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Terraform Validator: Terraform and OpenTofu Guide (agentscope-ai/QwenPaw, 36k stars), Terraform Skill (antonbabenko/terraform-skill, 2.4k stars), Review Docs (hashicorp/terraform-provider-aws, 11k stars) and Senior DevOps Toolkit (maslennikov-ig/claude-code-orchestrator-kit, 260 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
akin-ozer (a GitHub user) maintains it in akin-ozer/cc-devops-skills, which has 320 GitHub stars. The repository holds 30 skills in this directory. The repository was last updated on July 26, 2026.
Source: akin-ozer/cc-devops-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.