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.
Terraform 모듈 설계 패턴, 디렉토리 구조, 상태 관리, 환경 분리 전략의 상세 가이드. An agent skill from revfactory/harness-100.
$ npx skills add revfactory/harness-100 --skill terraform-module-patterns -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install revfactory/harness-100 terraform-module-patterns --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/revfactory/harness-100.git skills-src && mkdir -p .claude/skills && cp -r skills-src/ko/26-infra-as-code/.claude/skills/terraform-module-patterns .claude/skills/terraform-module-patterns && 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-module-patterns" agent skill from https://github.com/revfactory/harness-100/tree/main/ko/26-infra-as-code/.claude/skills/terraform-module-patterns into .claude/skills/terraform-module-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "terraform-module-patterns", 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/revfactory/harness-100/tree/main/ko/26-infra-as-code/.claude/skills/terraform-module-patternsType 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 revfactory/harness-100 --skill terraform-module-patterns -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install revfactory/harness-100 terraform-module-patterns --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .agents/skills && cp -r skills-src/ko/26-infra-as-code/.claude/skills/terraform-module-patterns .agents/skills/terraform-module-patterns && 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-module-patterns" agent skill from https://github.com/revfactory/harness-100/tree/main/ko/26-infra-as-code/.claude/skills/terraform-module-patterns into .agents/skills/terraform-module-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "terraform-module-patterns", 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 revfactory/harness-100 --skill terraform-module-patterns -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install revfactory/harness-100 terraform-module-patterns --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/ko/26-infra-as-code/.claude/skills/terraform-module-patterns .cursor/skills/terraform-module-patterns && 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-module-patterns" agent skill from https://github.com/revfactory/harness-100/tree/main/ko/26-infra-as-code/.claude/skills/terraform-module-patterns into .cursor/skills/terraform-module-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "terraform-module-patterns", 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/revfactory/harness-100.git --path ko/26-infra-as-code/.claude/skills/terraform-module-patterns--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 revfactory/harness-100 --skill terraform-module-patterns -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install revfactory/harness-100 terraform-module-patterns --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/ko/26-infra-as-code/.claude/skills/terraform-module-patterns .gemini/skills/terraform-module-patterns && 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-module-patterns" agent skill from https://github.com/revfactory/harness-100/tree/main/ko/26-infra-as-code/.claude/skills/terraform-module-patterns into .gemini/skills/terraform-module-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "terraform-module-patterns", 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 revfactory/harness-100 terraform-module-patternsInstalls 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 revfactory/harness-100 --skill terraform-module-patterns -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .github/skills && cp -r skills-src/ko/26-infra-as-code/.claude/skills/terraform-module-patterns .github/skills/terraform-module-patterns && 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-module-patterns" agent skill from https://github.com/revfactory/harness-100/tree/main/ko/26-infra-as-code/.claude/skills/terraform-module-patterns into .github/skills/terraform-module-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "terraform-module-patterns", 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 revfactory/harness-100 --skill terraform-module-patterns -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install revfactory/harness-100 terraform-module-patterns --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/revfactory/harness-100.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/ko/26-infra-as-code/.claude/skills/terraform-module-patterns .opencode/skills/terraform-module-patterns && 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-module-patterns" agent skill from https://github.com/revfactory/harness-100/tree/main/ko/26-infra-as-code/.claude/skills/terraform-module-patterns into .opencode/skills/terraform-module-patterns/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "terraform-module-patterns", 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-module-patternsTerraform 모듈 설계 패턴, 디렉토리 구조, 상태 관리, 환경 분리 전략의 상세 가이드. An agent skill from revfactory/harness-100.
Terraform Module Patterns is an agent skill from revfactory/harness-100. Terraform 모듈 설계 패턴, 디렉토리 구조, 상태 관리, 환경 분리 전략의 상세 가이드. 'Terraform 모듈', '모듈 구조', '상태 관리', 'remote state', '환경 분리', 'workspace', 'terragrunt', '모듈 패턴' 등 Terraform 모듈 설계 시 이 스킬을 사용한다. infra-architect와 drift-detector의 IaC 설계 역량을 강화한다. 단, 실제 terraform apply나 인프라 프로비저닝 실행은 이 스킬의 범위가 아니다.
Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in DevOps & Cloud, covering Infrastructure as code. It works with Terraform. The licence is Apache-2.0.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 8e8d35c. 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.
No scripts in the folder and no shell commands in SKILL.md (its code samples are hcl).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From 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 Module Patterns loads about 1.1k tokens when it runs. Until then it costs about 77 tokens; SKILL.md has 150 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); files beside SKILL.md are not scanned.
The full file from revfactory/harness-100 at commit 8e8d35c, republished under its Apache-2.0 licence (© revfactory). 150 words, ~1,085 tokens.
.claude/skills/terraform-module-patterns/SKILL.md (or your agent's skills folder).재사용 가능하고 유지보수성 높은 Terraform 모듈 설계를 위한 패턴과 베스트 프랙티스.
infrastructure/
├── modules/ # 재사용 가능한 모듈
│ ├── networking/
│ │ ├── vpc/
│ │ │ ├── main.tf
│ │ │ ├── variables.tf
│ │ │ ├── outputs.tf
│ │ │ └── README.md
│ │ ├── security-group/
│ │ └── load-balancer/
│ ├── compute/
│ │ ├── ecs-service/
│ │ ├── lambda/
│ │ └── ec2-asg/
│ └── data/
│ ├── rds/
│ ├── elasticache/
│ └── s3/
├── environments/ # 환경별 구성
│ ├── dev/
│ │ ├── main.tf # 모듈 호출
│ │ ├── terraform.tfvars # 환경 변수
│ │ └── backend.tf # 상태 저장소
│ ├── staging/
│ └── prod/
└── global/ # 환경 공통 (IAM, DNS)
├── iam/
└── route53/infrastructure/
├── modules/ # 동일
├── terragrunt.hcl # 루트 설정 (backend, provider)
└── environments/
├── terragrunt.hcl # 공통 변수
├── dev/
│ ├── terragrunt.hcl # include root + env vars
│ ├── vpc/
│ │ └── terragrunt.hcl # module source + inputs
│ ├── ecs/
│ └── rds/
└── prod/# 좋은 예: VPC 모듈은 VPC만 담당
module "vpc" {
source = "./modules/networking/vpc"
cidr_block = "10.0.0.0/16"
az_count = 3
}
# 나쁜 예: 하나의 모듈에 모든 인프라
module "everything" { # 안티패턴!
source = "./modules/full-stack"
}# variables.tf — 유효성 검증 필수
variable "instance_type" {
type = string
description = "EC2 인스턴스 타입"
default = "t3.medium"
validation {
condition = can(regex("^t3\\.", var.instance_type))
error_message = "t3 패밀리만 허용됩니다."
}
}
variable "environment" {
type = string
validation {
condition = contains(["dev", "staging", "prod"], var.environment)
error_message = "dev, staging, prod 중 하나여야 합니다."
}
}
# outputs.tf — 다른 모듈이 필요한 값만 노출
output "vpc_id" {
value = aws_vpc.main.id
description = "생성된 VPC의 ID"
}variable "enable_monitoring" {
type = bool
default = true
}
resource "aws_cloudwatch_metric_alarm" "cpu" {
count = var.enable_monitoring ? 1 : 0
# ...
}# backend.tf
terraform {
backend "s3" {
bucket = "company-terraform-state"
key = "environments/prod/vpc/terraform.tfstate"
region = "ap-northeast-2"
dynamodb_table = "terraform-locks"
encrypt = true
}
}| 전략 | 분리 기준 | 장점 | 단점 |
|---|---|---|---|
| 환경별 | dev/staging/prod | 환경 격리, 독립 배포 | 환경 간 참조 시 data source 필요 |
| 계층별 | network/compute/data | blast radius 축소 | 참조 관계 관리 복잡 |
| 팀별 | 팀 소유 리소스 | 자율성 | 공유 리소스 관리 어려움 |
| 라이프사이클별 | 변경 빈도 | 안정 리소스 보호 | 경계 설정 어려움 |
# Network 상태에서 VPC ID 읽기
data "terraform_remote_state" "network" {
backend = "s3"
config = {
bucket = "company-terraform-state"
key = "environments/prod/network/terraform.tfstate"
region = "ap-northeast-2"
}
}
# 사용
resource "aws_ecs_service" "app" {
network_configuration {
subnets = data.terraform_remote_state.network.outputs.private_subnet_ids
}
}locals {
common_tags = {
Environment = var.environment
Project = var.project_name
ManagedBy = "terraform"
Team = var.team_name
CostCenter = var.cost_center
}
}
resource "aws_instance" "app" {
tags = merge(local.common_tags, {
Name = "${var.project_name}-${var.environment}-app"
Role = "application"
})
}| 안티패턴 | 문제 | 해결 |
|---|---|---|
| 거대 상태 파일 | plan/apply 느림, blast radius 큼 | 계층별 분리 |
| 하드코딩 값 | 환경 간 재사용 불가 | variables + tfvars |
| 모듈 내 provider | 유연성 상실 | provider는 루트에서만 |
| count로 복잡한 조건 | 인덱스 변경 시 리소스 재생성 | for_each 사용 |
| 시크릿 평문 저장 | 보안 위반 | SSM/Vault 참조 |
© revfactory, 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
Just SKILL.md in ko/26-infra-as-code/.claude/skills/terraform-module-patterns of revfactory/harness-100.
Open the folder on GitHubat commit 8e8d35c
Terraform Module Patterns 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 Module Patterns this skillrevfactory/harness-100 | 1.3k | — | ~1.1k | Automated safety check: Pass | Apache-2.0 | |
| Terraform and OpenTofu Guideagentscope-ai/QwenPaw | 35k | 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 | |
| Senior DevOps Toolkitmaslennikov-ig/claude-code-orchestrator-kit | 259 | 6 repos | ~1.1k | Automated safety check: Notes | Custom licence | |
| Cloudflarehodgef/apiker | 127 | 7 repos | ~2.2k | Automated safety check: Pass | MIT | |
| Terravision Cloud Diagramspatrickchugh/terravision | 1.6k | — | ~5.6k | Automated safety check: Notes | AGPL-3.0-only |
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…
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.
dmmulroy/cloudflare-skill
Comprehensive Cloudflare platform skill covering Workers, Pages, storage (KV, D1, R2), AI (Workers AI, Vectorize, Agents SDK), networking (Tunnel, Spectrum), security (WAF, DDoS), and…
revfactory/harness-100
A skill for analyzing website anti-bot defense mechanisms and developing legitimate evasion strategies.
revfactory/harness-100
Reference for designing how an API reports failures: structured error codes, response shapes, client-friendly messages, an error catalog and retry or fallback advice.
revfactory/harness-100
Walks a backend-dev agent through OWASP API Top 10 checks, authentication and authorization patterns, and defense code during API design.
revfactory/harness-100
Methodology for systematically designing and generating CLI tool argument parser structures.
revfactory/harness-100
Audience segmentation skill used by the analyst and curator agents.
revfactory/harness-100
Audio storytelling skill used by the podcast scriptwriter and show note editor.
Works with
Categories
Terraform 모듈 설계 패턴, 디렉토리 구조, 상태 관리, 환경 분리 전략의 상세 가이드. An agent skill from revfactory/harness-100. Terraform Module Patterns is an agent skill from revfactory/harness-100. Terraform 모듈 설계 패턴, 디렉토리 구조, 상태 관리, 환경 분리 전략의 상세 가이드.
Terraform Module Patterns fits situations like: tasks that involve Infrastructure as code.
Run `npx skills add revfactory/harness-100 --skill terraform-module-patterns -a claude-code`. Or copy the skill folder (ko/26-infra-as-code/.claude/skills/terraform-module-patterns in revfactory/harness-100) into .claude/skills/terraform-module-patterns in your project. Claude Code loads it when a task matches its description.
Run `npx skills add revfactory/harness-100 --skill terraform-module-patterns -a codex`. Or copy the skill folder (ko/26-infra-as-code/.claude/skills/terraform-module-patterns in revfactory/harness-100) into .agents/skills/terraform-module-patterns 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 revfactory/harness-100 --skill terraform-module-patterns -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-module-patterns, .gemini/skills/terraform-module-patterns, .github/skills/terraform-module-patterns and .opencode/skills/terraform-module-patterns in your project.
SKILL.md names no scripts, command-line tools or credentials: Terraform Module Patterns is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. 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. Review the folder before installing.
Terraform Module Patterns 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 1.1k tokens (SKILL.md is roughly 4.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Terraform Module Patterns: Terraform and OpenTofu Guide (agentscope-ai/QwenPaw, 35k stars), Terraform Skill (antonbabenko/terraform-skill, 2.4k stars), Senior DevOps Toolkit (maslennikov-ig/claude-code-orchestrator-kit, 259 stars) and Cloudflare (hodgef/apiker, 127 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
revfactory (a GitHub user) maintains it in revfactory/harness-100, which has 1,290 GitHub stars. The repository holds 464 skills in this directory. The repository was last updated on March 22, 2026.
Source: revfactory/harness-100 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.