terraform-module
minagayid/Agents/skills/library/terraform-module/SKILL.md
Write clean, reusable Terraform modules and safe infrastructure changes. Use when the user asks to write Terraform/IaC, create a module, or review infrastructure code.
Skill1 starsChanged 3 months ago
What's in it
- Terraform Module
- Module structure
- Practices
- Workflow (safe change)
- Guidelines
--- name: terraform-module description: Write clean, reusable Terraform modules and safe infrastructure changes. Use when the user asks to write Terraform/IaC, create a module, or review infrastructure code. --- # Terraform Module Author Terraform that is reusable, reviewable, and safe to apply. ## Module structure ``` module/ ├── main.tf # resources ├── variables.tf # typed inputs with descriptions + validation ├── outputs.tf # outputs consumers need ├── versions.tf # required_version + provider version constraints └── README.md # purpose, inputs, outputs, example usage ``` ## Practices - **Typed variables** with `description`, sensible `default`s, and `validation` blocks; mark secrets `sensitive = true`. - **Pin versions** — `required_version` and provider constraints; commit `.terraform.lock.hcl`. - **Remote state** with locking (e.g. S3 + DynamoDB, GCS, Terraform Cloud); never commit state or secrets. - **No hard-coded values** — parameterize via variables; keep environments in separate workspaces/dirs. - **Least privilege** IAM; tag resources; use `for_each` over `count` for stable addressing. - **Composable** — small modules with clear inputs/outputs; avoid provider config inside reusable modules. ## Workflow (safe change) 1. `terraform fmt` and `terraform validate`. 2. `terraform plan` — **read the plan**; confirm no unexpected destroy/replace. 3. Apply to non-prod first; use `-target` sparingly and only knowingly. 4. Review drift; keep applies small and reversible. ## Guidelines - Treat `plan` output as the review artifact — a resource being destroyed/recreated is a red flag. - Prefer data sources and outputs over duplicating values across modules.
More agent context in minagayid/Agents
25 other files this repository gives its agents.
Skill
- agent-project-scaffoldskills/agent-project-scaffold/SKILL.md
- accessibility-auditskills/library/accessibility-audit/SKILL.md
- changelog-keeperskills/library/changelog-keeper/SKILL.md
- code-review-checklistskills/library/code-review-checklist/SKILL.md
- conventional-commitsskills/library/conventional-commits/SKILL.md
- data-cleaningskills/library/data-cleaning/SKILL.md
- debugging-methodologyskills/library/debugging-methodology/SKILL.md
- dependency-auditskills/library/dependency-audit/SKILL.md
- dockerfile-authorskills/library/dockerfile-author/SKILL.md
- exploratory-data-analysisskills/library/exploratory-data-analysis/SKILL.md
- github-actions-ciskills/library/github-actions-ci/SKILL.md
- incident-postmortemskills/library/incident-postmortem/SKILL.md
- kubernetes-manifestskills/library/kubernetes-manifest/SKILL.md
- pr-descriptionskills/library/pr-description/SKILL.md
- prompt-engineeringskills/library/prompt-engineering/SKILL.md
- react-componentskills/library/react-component/SKILL.md
- readme-generatorskills/library/readme-generator/SKILL.md
- refactoringskills/library/refactoring/SKILL.md
- rest-api-designerskills/library/rest-api-designer/SKILL.md
- secure-coding-reviewskills/library/secure-coding-review/SKILL.md
- sql-optimizerskills/library/sql-optimizer/SKILL.md
- technical-writingskills/library/technical-writing/SKILL.md
- threat-modelskills/library/threat-model/SKILL.md
- unit-test-writerskills/library/unit-test-writer/SKILL.md
- web-performanceskills/library/web-performance/SKILL.md
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool public_context_discussion, action report. How to connect one.

