terraform rulesA
terraform is agent-read markdown (rules) from nitinjain999/platform-skills: Terraform module and resource generation rules — blast radius, IAM least privilege, SOC 2 defaults.
Indexed from public GitHub and served as immutable, content-addressed versions. Install it pinned to an exact SHA-256 with the mdr CLI, and every file is verified against the hash recorded here before it reaches your agent. The deterministic audit below grades the latest version, and the same file always earns the same grade.
What the file says
# Terraform Rules
## Module structure
Every Terraform module must have: `main.tf`, `variables.tf`, `outputs.tf`, `versions.tf`, `README.md`.
## Variable validation — always include
```hcl
variable "environment" {
type = string
validation {
condition = contains(["dev", "staging", "production"], var.environment)
error_message = "environment must be dev, staging, or production"
}
}
```
## Pipeline order — enforce all gates before plan
`terraform fmt -check` → `terraform validate` → `tflint` → `checkov`/`tfsec` → `plan`
## IAM — never generate wildcards
```hcl
# ❌ Never
statement {
actions = ["*"]
resources = ["*"]
}
# ✅ Always
statement {
actions = ["s3:GetObject", "s3:ListBucket"]
resources = ["arn:aws:s3:::my-bucket", "arn:aws:s3:::my-bucket/*"]
}
```
## Tagging — always enforce at provider level
```hcl
provider "aws" {
default_tags {
tags = { env = var.environment, team = var.team, managed-by = "terraform" }
}
}
```
## SOC 2 — never generate
- `publicly_accessible = true` on RDS, Redshift, OpenSearch
- `encrypted = false` on any storage (S3, EBS, RDS, DynamoDB, ElastiCache, EFS)
- `is_multi_region_trail = false` on CloudTrail
…Read the whole file at its exact version.
How to install
mdr add nitinjain999/platform-skills/.cursor/rules/terraform.mdc@git:20260516.215750bmdr add nitinjain999/platform-skills/.cursor/rules/terraform.mdc@sha256:330aa37ba5783e95Pin to a label to follow the author's releases, or to a sha256 to freeze the exact bytes forever. Either way the resolved hash is written to mdr.lock, and mdr install reproduces it on any machine.
[](https://markdownregistry.com/a/art_nbnispmsjkqzi6uf)
1 badge views in 30 days
Versions
Audit of the latest version
- pass: Size between 200 bytes and 200 KB (2568 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
nitinjain999/platform-skills · 42 stars · license Apache-2.0 · pushed 2026-09-23 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_nbnispmsjkqzi6uf GET https://markdownregistry.com/api/v1/resolve?ref=nitinjain999/platform-skills/.cursor/rules/terraform.mdc GET https://markdownregistry.com/api/v1/blob/330aa37ba5783e95d7b701124b62c5dc7c0686670e6b8d379942a39cbd5e4f72
Your agent does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
More from nitinjain999/platform-skills
Every file in nitinjain999/platform-skills