002_terraform

002_terraform is a cursor rule for Cursor from nwiizo/tfmcp. It costs 234 tokens per session, scanned A, original, MIT.

A set of coding standards for Terraform, a tool that defines cloud infrastructure in configuration files. It covers supported versions, HCL parsing, configuration checks, formatting, state files, CLI errors, and example configurations.

In plain words
What is it for?
Use it when developing or reviewing tfmcp features that parse, analyze, format, test, or run Terraform configurations.
Why use it?
It gives developers consistent rules for reading and maintaining Terraform configurations while reducing mistakes around dependencies, providers, and state.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when developing or reviewing tfmcp features that parse, analyze, format, test, or run Terraform configurations.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/nwiizo/tfmcp/002_terraform
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/nwiizo/tfmcp

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for 002_terraform

README.md
[![agentmods](https://agentmods.dev/badge/rules/nwiizo/tfmcp/002_terraform/github.svg)](https://agentmods.dev/rules/nwiizo/tfmcp/002_terraform)
Your own site
<a href="https://agentmods.dev/rules/nwiizo/tfmcp/002_terraform"><img src="https://agentmods.dev/badge/rules/nwiizo/tfmcp/002_terraform/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for 002_terraform

Your own site · 80×15
<a href="https://agentmods.dev/rules/nwiizo/tfmcp/002_terraform"><img src="https://agentmods.dev/badge/rules/nwiizo/tfmcp/002_terraform.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 234 This file is loaded in full into every session.
When invoked 234 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00234 $0.00234
Opus 5.5 $0.00094 $0.00094
Sonnet 5.5 $0.00047 $0.00047
Haiku 4.5 $0.00023 $0.00023

Measured 3mo ago against content hash 08fc00956628, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

002_terraform scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/002_terraform.mdc · 36 lines

What it actually says

Terraform Standards

Version Support

  • Target Terraform 1.15.8 as the primary supported version.
  • Ensure backward compatibility with Terraform 1.0+ when possible.
  • Test with multiple Terraform versions for compatibility.

Terraform Parsing

  • Use the Terraform provided HCL parser when available.
  • Implement proper escaping and handling of HCL syntax.
  • Handle comments and formatting appropriately.

Configuration Analysis

  • Analyze Terraform configurations thoroughly:
    • Check for resource dependencies
    • Validate provider configurations
    • Identify potential issues or optimizations
  • Support various Terraform resources and providers.

Best Practices

  • Follow HCL formatting conventions.
  • Respect Terraform state management principles.
  • Handle terraform.tfstate files with care.
  • Implement proper error handling for Terraform CLI operations.

Demo Environment

  • Maintain example/ directory with good Terraform examples.
  • Ensure the demo environment is self-contained and works out of the box.
  • Keep example/ code up to date with best practices.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 36 lines · 234 tokens per session scan A 08fc00956628

Subscribe to this mod's changes

002_terraform is a cursor rule published in the GitHub repository nwiizo/tfmcp (373 stars, last pushed 4d ago), licensed MIT. It adds 234 tokens to every session, about $0.0009 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

002_terraform compared with cursor rules from other repositories

002_terraform next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
002_terraformnwiizo/tfmcpCursor rule3734d agoMITA234Cursor
terraform-rulesbeel-collab/presets.devCursor rule37d agoMITA0Cursor
workflowsTencentCloudCommunity/mcp-serverCursor rule344mo agoApache-2.0A6Cursor
layero-deploymentLayeroInfra/layero-claudeCursor rule03mo agoMITA0Cursor
ponytailDietrichGebert/ponytailCursor rule201k8d agoMITA604Cursor
angular-20angular/angularCursor rule102k4d agoMITA0Cursor
dev-standardapache/supersetCursor rule76ktodayApache-2.0A1,147Cursor